Skip to content

Commit

Permalink
test: check parsing of empty content (#3021)
Browse files Browse the repository at this point in the history
Add a test to check this use case.
This completes the textual content check.
  • Loading branch information
tbouffard authored Jan 24, 2024
1 parent bad01f7 commit 7cfec41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unit/component/parser/BpmnParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ describe('parse xml to model', () => {
describe('error management', () => {
const parsingErrorMessage = `XML parsing failed. Unable to retrieve 'definitions' from the BPMN source.`;

it('Parse empty content', () => {
expect(() => newBpmnParser().parse('')).toThrow(parsingErrorMessage);
});

it('Parse a text file', () => {
expect(() => newBpmnParser().parse(readFileSync('../fixtures/bpmn/xml-parsing/special/text-only.txt'))).toThrow(parsingErrorMessage);
});
Expand Down

0 comments on commit 7cfec41

Please sign in to comment.