Skip to content

Commit b093ea2

Browse files
committed
Add test for fix added in 7f0d79c
1 parent 234bc9b commit b093ea2

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/__tests__/error_handling.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,19 @@ if (process.env.DEBUG) setDebugLogSink(console.log);
281281
`Unexpected END-IF outside of IF statement context: END-IF`
282282
);
283283
});
284+
285+
it('Incomplete loop statement: unmatched END-FOR', async () => {
286+
const template = await fs.promises.readFile(
287+
path.join(__dirname, 'fixtures', 'unmatchedEndFor.docx')
288+
);
289+
await expect(
290+
createReport({
291+
noSandbox,
292+
template,
293+
data: {},
294+
})
295+
).rejects.toThrow(
296+
`Unexpected END-FOR outside of FOR loop context: END-FOR`
297+
);
298+
});
284299
});
12.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)