0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests/testdata/test/steps
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
..
failing_steps.dot.out feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
failing_steps.out feat(test): print pending tests on sigint (#18246) 2023-03-25 21:32:11 +02:00
failing_steps.tap.out feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00
failing_steps.ts feat(unstable/test): imperative test steps API (#12190) 2021-10-11 09:45:02 -04:00
ignored_steps.dot.out feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
ignored_steps.out refactor: allocate IDs for tests (#14729) 2022-07-15 13:09:22 -04:00
ignored_steps.tap.out feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00
ignored_steps.ts feat(unstable/test): imperative test steps API (#12190) 2021-10-11 09:45:02 -04:00
invalid_usage.out feat(test): print pending tests on sigint (#18246) 2023-03-25 21:32:11 +02:00
invalid_usage.ts feat(test): print pending tests on sigint (#18246) 2023-03-25 21:32:11 +02:00
output_within.out chore: fix flaky tests checking ms when CI is slow (#18559) 2023-04-06 23:48:07 +02:00
output_within.ts feat(test): format user code output (#14271) 2022-04-15 14:24:41 +02:00
passing_steps.dot.out feat(cli): Add dot test reporter (#19804) 2023-08-02 18:38:10 +02:00
passing_steps.out chore: fix flaky tests checking ms when CI is slow (#18559) 2023-04-06 23:48:07 +02:00
passing_steps.tap.out feat(cli/tools): add TAP test reporter (#14390) (#20073) 2023-08-26 01:19:23 +02:00
passing_steps.ts feat: allow first arg in test step to be a function (#17096) 2023-01-24 15:41:01 +01:00