Skip to content

Commit

Permalink
chore: merge reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 6, 2024
1 parent 6d8de47 commit 5ba1bbb
Showing 1 changed file with 6 additions and 201 deletions.
207 changes: 6 additions & 201 deletions test/reporters/tests/__snapshots__/reporters.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,14 @@

exports[`JUnit reporter (no outputFile entry) 1`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;

exports[`JUnit reporter 1`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;
Expand All @@ -79,36 +21,7 @@ exports[`JUnit reporter with outputFile 1`] = `
exports[`JUnit reporter with outputFile 2`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;
Expand All @@ -120,36 +33,7 @@ exports[`JUnit reporter with outputFile in non-existing directory 1`] = `
exports[`JUnit reporter with outputFile in non-existing directory 2`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;
Expand All @@ -161,36 +45,7 @@ exports[`JUnit reporter with outputFile object 1`] = `
exports[`JUnit reporter with outputFile object 2`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;
Expand All @@ -202,57 +57,7 @@ exports[`JUnit reporter with outputFile object in non-existing directory 1`] = `
exports[`JUnit reporter with outputFile object in non-existing directory 2`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="9" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="9" failures="1" errors="0" skipped="2" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; Math.sqrt()" time="0.001442286">
<failure message="expected 2.23606797749979 to equal 2" type="AssertionError">
AssertionError: expected 2.23606797749979 to equal 2
❯ test/core/test/basic.test.ts:8:32
</failure>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; JSON" time="0.001023711">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; async with timeout" time="0">
<skipped/>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; timeout" time="0.1005059841">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success " time="0.020184875">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success " time="0.0003324542">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback setup success done(false)" time="0.019738606">
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; callback test success done(false)" time="0.0001923509">
<system-err>
[33merror[39m
</system-err>
</testcase>
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; todo test" time="0">
<skipped/>
</testcase>
</testsuite>
</testsuites>
"
`;
exports[`JUnit reporter with outputFile with XML in error message 1`] = `
"JUNIT report written to <process-cwd>/report_escape_msg_xml.xml
"
`;
exports[`JUnit reporter with outputFile with XML in error message 2`] = `
"<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="1" failures="1" errors="0" time="0">
<testsuite name="test/core/test/basic.test.ts" timestamp="2022-01-19T10:10:01.759Z" hostname="hostname" tests="1" failures="1" errors="0" skipped="0" time="0.145992842">
<testcase classname="test/core/test/basic.test.ts" name="suite &gt; test with xml in error" time="0.0021231231">
<failure message="error message that has XML in it &lt;tag&gt;" type="AssertionError">
AssertionError: error message that has XML in it &lt;tag&gt;
❯ test/core/test/basic.test.ts:8:32
❯ test/core/test/&lt;bracket-name&gt;.ts:3:11
</failure>
</testcase>
</testsuite>
<testsuites name="vitest tests" tests="0" failures="0" errors="0" time="0">
</testsuites>
"
`;
Expand Down

0 comments on commit 5ba1bbb

Please sign in to comment.