1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/cli/tools/test/reporters
Valentin Anger a526cff0a9
feat(cli/tools): add TAP test reporter (#14390) (#20073)
This PR adds a test reporter for the [Test Anything
Protocol](https://testanything.org).

It makes the following implementation decisions:
- No TODO pragma, as there is no such marker in `Deno.test`
- SKIP pragma for `ignore`d tests
- Test steps are treated as TAP14 subtests
  - Support for this in consumers seems spotty
- Some consumers will incorrectly interpret these markers, resulting in
unexpected output
- Considering the lack of support, and to avoid implementation
complexity,
subtests are at most one level deep (all test steps are in the same
subtest)
- To accommodate consumers that use comments to indicate test-suites
(unspecced)
  - The test module path is output as a comment
  - This is disabled for `--parallel` testing
- Failure diagnostics are output as JSON, which is also valid YAML
- The structure is not specified, so the format roughly follows the spec
example:
  ```
  ---
  message: "Failed with error 'hostname peebles.example.com not found'"
  severity: fail
  found:
    hostname: 'peebles.example.com'
    address: ~
  wanted:
    hostname: 'peebles.example.com'
    address: '85.193.201.85'
  at:
    file: test/dns-resolve.c
    line: 142
  ...
  ```
2023-08-26 01:19:23 +02:00
..
common.rs feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
compound.rs refactor(cli/test): move reporters to a separate directory (#19957) 2023-07-27 02:16:12 +02:00
dot.rs feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
junit.rs fix(test): JUnit reporter includes file, line and column attributes (#20174) 2023-08-17 23:41:29 +02:00
mod.rs feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00
pretty.rs feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
tap.rs feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00