Skip to content

Commit

Permalink
Added failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanbcook committed Feb 13, 2024
1 parent 4255d9e commit 6c52936
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/data/junit/testCafe.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="TestCafe Tests" tests="2" failures="0" skipped="0" errors="0" time="211.682" timestamp="Tue, 13 Feb 2024 10:28:58 GMT" >
<testcase classname="Tests" file="/home/vsts/work/1/s/testcafe/tests/test1.js" name="Test1" time="15.513">
</testcase>
<testcase classname="Tests" file="/home/vsts/work/1/s/testcafe/tests/test1.js" name="Test2" time="193.695">
</testcase>
</testsuite>
7 changes: 7 additions & 0 deletions tests/parser.junit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,13 @@ describe('Parser - JUnit', () => {
});
});

it('parse testcafe with testSuite root node', () => {
const result = parse({ type: 'junit', files: [`${testDataPath}/testCafe.xml`] });

assert.equal(result.suites.length, 1);
assert.equal(result.suites[0].cases.length, 2);
});

it('empty suite with no tests', () => {
const result = parse({ type: 'junit', files: [`${testDataPath}/no-suites.xml`] });
assert.deepEqual(result, {
Expand Down

0 comments on commit 6c52936

Please sign in to comment.