1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/cli/tools
Cooper Benson 0e4d6d41ad
feat(cli): Adding JUnit test reports (#19747)
This commit makes the following changes
- Created a `CompoundTestReporter` to allow us to use multiple reporters
- Implements `JUnitTestReporter` which writes JUnit XML to a path
- Added a CLI flag/option `--junit` that enables JUnit reporting. By
default this writes the report to `stdout` (and disables pretty
reporting). If a path is provided, it will write the JUnit report to
that file while the pretty reporter writes to stdout like normal

Output of `deno -- test --allow-all --unstable
--location=http://js-unit-tests/foo/bar --junit
cli/tests/unit/testing_test.ts `
```xml
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="deno test" tests="7" failures="0" errors="0" time="0.176">
    <testsuite name="file:///Users/cooper/deno/deno/cli/tests/unit/testing_test.ts" tests="7" disabled="0" errors="0" failures="0">
        <testcase name="testWrongOverloads" time="0.012">
        </testcase>
        <testcase name="nameOfTestCaseCantBeEmpty" time="0.009">
        </testcase>
        <testcase name="invalidStepArguments" time="0.008">
        </testcase>
        <testcase name="nameOnTextContext" time="0.029">
            <properties>
                <property name="step[passed]" value="step ... nested step"/>
                <property name="step[passed]" value="step"/>
            </properties>
        </testcase>
        <testcase name="originOnTextContext" time="0.030">
            <properties>
                <property name="step[passed]" value="step ... nested step"/>
                <property name="step[passed]" value="step"/>
            </properties>
        </testcase>
        <testcase name="parentOnTextContext" time="0.030">
            <properties>
                <property name="step[passed]" value="step ... nested step"/>
                <property name="step[passed]" value="step"/>
            </properties>
        </testcase>
        <testcase name="explicit undefined for boolean options" time="0.009">
        </testcase>
    </testsuite>
</testsuites>
```
2023-07-27 00:12:35 +02:00
..
coverage chore: update to Rust 1.71 (#19822) 2023-07-13 15:16:24 -06:00
init fix(cli/init): update to assert/mod.ts (#19924) 2023-07-24 19:57:01 +00:00
repl chore: update to Rust 1.71 (#19822) 2023-07-13 15:16:24 -06:00
vendor fix(vendor): do not panic vendoring with jsxImportSource and no jsx files (#19837) 2023-07-14 18:10:42 -04:00
bench.rs fix(bench): run warmup benchmark to break JIT bias (#19844) 2023-07-17 21:17:28 +00:00
bundle.rs refactor(flags): move watch flags into subcommand structs (#19516) 2023-06-15 13:09:37 -04:00
check.rs fix(check): should bust check cache when json module or npm resolution changes (#19941) 2023-07-26 17:23:07 -04:00
compile.rs refactor: helpers methods on TypeCheckMode (#19393) 2023-06-07 10:09:10 -04:00
doc.rs Reland "fix(cli): don't store blob and data urls in the module cache" (#18581) 2023-07-02 00:52:30 +02:00
fmt.rs chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
info.rs fix: deno info should respect import map (#19781) 2023-07-25 18:23:43 +02:00
installer.rs chore(tests): test_util - Add PathRef (#19450) 2023-06-10 11:09:45 -04:00
lint.rs fix(lint): allow to use --rules with --rules-tags (#19754) 2023-07-25 17:24:06 -04:00
mod.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
run.rs Reland "fix(cli): don't store blob and data urls in the module cache" (#18581) 2023-07-02 00:52:30 +02:00
task.rs chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
test.rs feat(cli): Adding JUnit test reports (#19747) 2023-07-27 00:12:35 +02:00
upgrade.rs fix(cli): output file handling in deno upgrade (#18994) 2023-07-20 19:51:02 +00:00