From fabd6b47963870b3f045ff335ad459abd371a804 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Tue, 6 May 2025 22:07:33 +0200 Subject: [PATCH 1/2] Stop testing Node.js 23 Leave allowed in engines for now. --- .github/workflows/ci.yml | 2 +- test-tap/reporters/default.edgecases.v23.log | 59 --- test-tap/reporters/default.failfast.v23.log | 24 -- test-tap/reporters/default.failfast2.v23.log | 24 -- test-tap/reporters/default.only.v23.log | 10 - test-tap/reporters/default.regular.v23.log | 359 ------------------ .../default.timeoutcontextlogs.v23.log | 38 -- .../default.timeoutinmultiplefiles.v23.log | 34 -- .../default.timeoutinsinglefile.v23.log | 20 - .../default.timeoutwithmatch.v23.log | 18 - test-tap/reporters/default.watch.v23.log | 32 -- test-tap/reporters/tap.edgecases.v23.log | 42 -- test-tap/reporters/tap.failfast.v23.log | 17 - test-tap/reporters/tap.failfast2.v23.log | 19 - test-tap/reporters/tap.only.v23.log | 13 - test-tap/reporters/tap.regular.v23.log | 258 ------------- 16 files changed, 1 insertion(+), 968 deletions(-) delete mode 100644 test-tap/reporters/default.edgecases.v23.log delete mode 100644 test-tap/reporters/default.failfast.v23.log delete mode 100644 test-tap/reporters/default.failfast2.v23.log delete mode 100644 test-tap/reporters/default.only.v23.log delete mode 100644 test-tap/reporters/default.regular.v23.log delete mode 100644 test-tap/reporters/default.timeoutcontextlogs.v23.log delete mode 100644 test-tap/reporters/default.timeoutinmultiplefiles.v23.log delete mode 100644 test-tap/reporters/default.timeoutinsinglefile.v23.log delete mode 100644 test-tap/reporters/default.timeoutwithmatch.v23.log delete mode 100644 test-tap/reporters/default.watch.v23.log delete mode 100644 test-tap/reporters/tap.edgecases.v23.log delete mode 100644 test-tap/reporters/tap.failfast.v23.log delete mode 100644 test-tap/reporters/tap.failfast2.v23.log delete mode 100644 test-tap/reporters/tap.only.v23.log delete mode 100644 test-tap/reporters/tap.regular.v23.log diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02a037ef1..77919e412 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [^18.18, ^20.8, ^22, ^23] + node-version: [^18.18, ^20.8, ^22] os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v4 diff --git a/test-tap/reporters/default.edgecases.v23.log b/test-tap/reporters/default.edgecases.v23.log deleted file mode 100644 index 8b1c5dcdf..000000000 --- a/test-tap/reporters/default.edgecases.v23.log +++ /dev/null @@ -1,59 +0,0 @@ - ----tty-stream-chunk-separator - ⚠ Could not parse ast-syntax-error.cjs for line number selection - - SyntaxError: Unexpected token (3:11) - ----tty-stream-chunk-separator - Uncaught exception in ast-syntax-error.cjs - - ~/test-tap/fixture/report/edgecases/ast-syntax-error.cjs:3 - const fn = do { - ^^ - - SyntaxError: Unexpected token 'do' - ----tty-stream-chunk-separator - ✘ ast-syntax-error.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ✘ No tests found in ava-import-no-test-declaration.cjs ----tty-stream-chunk-separator - - Uncaught exception in import-and-use-test-member.cjs - - import-and-use-test-member.cjs:3 - - 2: -  3: test('pass', t => t.pass()); - 4: - - TypeError: test is not a function - - › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.cjs:3:1) - ----tty-stream-chunk-separator - ✘ import-and-use-test-member.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ✘ No tests found in no-ava-import.cjs, make sure to import "ava" at the top of your test file ----tty-stream-chunk-separator - ✘ Line numbers for test.cjs did not match any tests ----tty-stream-chunk-separator - - Uncaught exception in throws.cjs - - throws.cjs:1 - -  1: throw new Error('throws'); - 2: - - Error: throws - - › Object. (test-tap/fixture/report/edgecases/throws.cjs:1:7) - ----tty-stream-chunk-separator - ✘ throws.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ─ - - 3 uncaught exceptions ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.failfast.v23.log b/test-tap/reporters/default.failfast.v23.log deleted file mode 100644 index 1822d26dd..000000000 --- a/test-tap/reporters/default.failfast.v23.log +++ /dev/null @@ -1,24 +0,0 @@ - ----tty-stream-chunk-separator - ✘ [fail]: a › fails Test failed via `t.fail()` ----tty-stream-chunk-separator - ─ - - a › fails - - a.cjs:3 - - 2: -  3: test('fails', t => t.fail()); - 4: - - Test failed via `t.fail()` - - › test-tap/fixture/report/failfast/a.cjs:3:22 - - ─ - - `--fail-fast` is on. 1 test file was skipped. - - 1 test failed ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.failfast2.v23.log b/test-tap/reporters/default.failfast2.v23.log deleted file mode 100644 index 29437d029..000000000 --- a/test-tap/reporters/default.failfast2.v23.log +++ /dev/null @@ -1,24 +0,0 @@ - ----tty-stream-chunk-separator - ✘ [fail]: a › fails Test failed via `t.fail()` ----tty-stream-chunk-separator - ─ - - a › fails - - a.cjs:3 - - 2: -  3: test('fails', t => t.fail());  - 4: test('passes', t => t.pass()); - - Test failed via `t.fail()` - - › test-tap/fixture/report/failfast2/a.cjs:3:22 - - ─ - - `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. - - 1 test failed ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.only.v23.log b/test-tap/reporters/default.only.v23.log deleted file mode 100644 index f01706e56..000000000 --- a/test-tap/reporters/default.only.v23.log +++ /dev/null @@ -1,10 +0,0 @@ - ----tty-stream-chunk-separator - ✔ a › only ----tty-stream-chunk-separator - ✔ b › passes ----tty-stream-chunk-separator - ─ - - 2 tests passed ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.regular.v23.log b/test-tap/reporters/default.regular.v23.log deleted file mode 100644 index c65476560..000000000 --- a/test-tap/reporters/default.regular.v23.log +++ /dev/null @@ -1,359 +0,0 @@ - ----tty-stream-chunk-separator - Uncaught exception in bad-test-chain.cjs - - bad-test-chain.cjs:3 - - 2: -  3: test.serial.test('passes', t => t.pass()); - 4: - - TypeError: test.serial.test is not a function - - › Object. (test-tap/fixture/report/regular/bad-test-chain.cjs:3:13) - ----tty-stream-chunk-separator - ✘ bad-test-chain.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ✘ [fail]: nested-objects › format with max depth 4 ----tty-stream-chunk-separator - ✘ [fail]: nested-objects › format like with max depth 4 ----tty-stream-chunk-separator - output-in-hook › before hook - ℹ before ----tty-stream-chunk-separator - output-in-hook › beforeEach hook for passing test - ℹ beforeEach ----tty-stream-chunk-separator - output-in-hook › beforeEach hook for failing test - ℹ beforeEach ----tty-stream-chunk-separator - ✔ output-in-hook › passing test ----tty-stream-chunk-separator - ✘ [fail]: output-in-hook › failing test Test failed via `t.fail()` ----tty-stream-chunk-separator - output-in-hook › afterEach hook for passing test - ℹ afterEach ----tty-stream-chunk-separator - output-in-hook › afterEach.always hook for failing test - ℹ afterEachAlways ----tty-stream-chunk-separator - output-in-hook › afterEach.always hook for passing test - ℹ afterEachAlways ----tty-stream-chunk-separator - output-in-hook › cleanup - ℹ afterAlways ----tty-stream-chunk-separator - - [skip] test › skip ----tty-stream-chunk-separator - - [todo] test › todo ----tty-stream-chunk-separator - ✔ test › passes ----tty-stream-chunk-separator - ✘ [fail]: test › fails Test failed via `t.fail()` ----tty-stream-chunk-separator - ✔ [expected fail] test › known failure ----tty-stream-chunk-separator - ✘ [unexpected pass]: test › no longer failing Test was expected to fail, but succeeded, you should stop marking the test as failing ----tty-stream-chunk-separator - ✘ [fail]: test › logs Test failed via `t.fail()` - ℹ hello - ℹ world ----tty-stream-chunk-separator - ✘ [fail]: test › formatted ----tty-stream-chunk-separator - ✘ [fail]: test › implementation throws non-error Error thrown in test ----tty-stream-chunk-separator - ✘ [fail]: traces-in-t-throws › throws ----tty-stream-chunk-separator - ✘ [fail]: traces-in-t-throws › notThrows ----tty-stream-chunk-separator - ✘ [fail]: traces-in-t-throws › notThrowsAsync ----tty-stream-chunk-separator - ✘ [fail]: traces-in-t-throws › throwsAsync ----tty-stream-chunk-separator - ✘ [fail]: traces-in-t-throws › throwsAsync different error ----tty-stream-chunk-separator - ✔ uncaught-exception › passes ----tty-stream-chunk-separator - - Uncaught exception in uncaught-exception.cjs - - uncaught-exception.cjs:5 - - 4: setImmediate(() => { -  5: throw new Error('Can’t catch me'); - 6: }); - - Error: Can’t catch me - - › Immediate. (test-tap/fixture/report/regular/uncaught-exception.cjs:5:9) - ----tty-stream-chunk-separator - ✘ uncaught-exception.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ✔ unhandled-rejection › passes ----tty-stream-chunk-separator - ✔ unhandled-rejection › unhandled non-error rejection ----tty-stream-chunk-separator - - Unhandled rejection in unhandled-rejection.cjs - - unhandled-rejection.cjs:4 - - 3: const passes = t => { -  4: Promise.reject(new Error('Can’t catch me')); - 5: t.pass(); - - Error: Can’t catch me - - › passes (test-tap/fixture/report/regular/unhandled-rejection.cjs:4:17) - ----tty-stream-chunk-separator - Unhandled rejection in unhandled-rejection.cjs - - null - ----tty-stream-chunk-separator - ✘ unhandled-rejection.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - ─ - - nested-objects › format with max depth 4 - - nested-objects.cjs:29 - - 28: }; -  29: t.deepEqual(exp, act); - 30: }); - - Difference (- actual, + expected): - - { - a: { - b: { - foo: 'bar', - }, - }, - + c: { - + d: { - + e: { - + foo: 'bar', - + }, - + }, - + }, - } - - › test-tap/fixture/report/regular/nested-objects.cjs:29:4 - - - - nested-objects › format like with max depth 4 - - nested-objects.cjs:55 - - 54: }; -  55: t.like(actual, pattern); - 56: }); - - Difference (- actual, + expected): - - { - a: { - b: { - - foo: 'bar', - + foo: 'qux', - }, - }, - } - - › test-tap/fixture/report/regular/nested-objects.cjs:55:4 - - - - output-in-hook › failing test - - output-in-hook.cjs:34 - - 33: test('failing test', t => { -  34: t.fail();  - 35: }); - - Test failed via `t.fail()` - - › test-tap/fixture/report/regular/output-in-hook.cjs:34:4 - - - - test › fails - - test.cjs:9 - - 8: -  9: test('fails', t => t.fail()); - 10: - - Test failed via `t.fail()` - - › test-tap/fixture/report/regular/test.cjs:9:22 - - - - test › no longer failing - - Test was expected to fail, but succeeded, you should stop marking the test as failing - - - - test › logs - test.cjs:18 - - 17: t.log('world'); -  18: t.fail();  - 19: }); - - Test failed via `t.fail()` - - › test-tap/fixture/report/regular/test.cjs:18:4 - - - - test › formatted - - test.cjs:22 - - 21: test('formatted', t => { -  22: t.deepEqual('foo', 'bar'); - 23: }); - - Difference (- actual, + expected): - - - 'foo' - + 'bar' - - › test-tap/fixture/report/regular/test.cjs:22:4 - - - - test › implementation throws non-error - - Error thrown in test: - - null - - - - traces-in-t-throws › throws - - traces-in-t-throws.cjs:12 - - 11: test('throws', t => { -  12: t.throws(() => throwError(), {instanceOf: TypeError}); - 13: }); - - Function threw unexpected exception: - - Error { - message: 'uh-oh', - } - - Expected instance of: - - Function TypeError {} - - › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) - › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.cjs:12:17) - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:12:4 - - - - traces-in-t-throws › notThrows - - traces-in-t-throws.cjs:16 - - 15: test('notThrows', t => { -  16: t.notThrows(() => throwError()); - 17: }); - - Function threw: - - Error { - message: 'uh-oh', - } - - › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:16:20 - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:16:4 - - - - traces-in-t-throws › notThrowsAsync - - traces-in-t-throws.cjs:20 - - 19: test('notThrowsAsync', async t => { -  20: await t.notThrowsAsync(() => throwError()); - 21: }); - - Function threw: - - Error { - message: 'uh-oh', - } - - › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:20:31 - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:20:10 - - - - traces-in-t-throws › throwsAsync - - traces-in-t-throws.cjs:24 - - 23: test('throwsAsync', async t => { -  24: await t.throwsAsync(() => throwError(), {instanceOf: TypeError}); - 25: }); - - Function threw synchronously. Use `t.throws()` instead: - - Error { - message: 'uh-oh', - } - - › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) - › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.cjs:24:28) - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:24:10 - - - - traces-in-t-throws › throwsAsync different error - - traces-in-t-throws.cjs:28 - - 27: test('throwsAsync different error', async t => { -  28: await t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); - 29: }); - - Returned promise rejected with unexpected exception: - - Error { - message: 'uh-oh', - } - - Expected instance of: - - Function TypeError {} - - › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.cjs:8:24) - › test-tap/fixture/report/regular/traces-in-t-throws.cjs:28:10 - - ─ - - 13 tests failed - 1 known failure - 1 test skipped - 1 test todo - 2 unhandled rejections - 2 uncaught exceptions ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutcontextlogs.v23.log b/test-tap/reporters/default.timeoutcontextlogs.v23.log deleted file mode 100644 index 04018664f..000000000 --- a/test-tap/reporters/default.timeoutcontextlogs.v23.log +++ /dev/null @@ -1,38 +0,0 @@ - ----tty-stream-chunk-separator - ✔ a › a passes ----tty-stream-chunk-separator - ✔ a › a passes two ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 2 tests were pending in a.cjs - - ◌ a › a slow - ℹ this slow test prints useful debug message just text - ◌ a › a slow two - ℹ another useful debug message { -  x: 5, - } - ----tty-stream-chunk-separator - ✔ b › a passes ----tty-stream-chunk-separator - ✔ b › a passes two ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 2 tests were pending in b.cjs - - ◌ b › a slow - ℹ hello world - ◌ b › a slow two - ----tty-stream-chunk-separator - ─ - - 4 tests passed - 4 tests remained pending after a timeout ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutinmultiplefiles.v23.log b/test-tap/reporters/default.timeoutinmultiplefiles.v23.log deleted file mode 100644 index f3a678ae2..000000000 --- a/test-tap/reporters/default.timeoutinmultiplefiles.v23.log +++ /dev/null @@ -1,34 +0,0 @@ - ----tty-stream-chunk-separator - ✔ a › a passes ----tty-stream-chunk-separator - ✔ a › a passes two ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 2 tests were pending in a.cjs - - ◌ a › a slow - ◌ a › a slow two - ----tty-stream-chunk-separator - ✔ b › b passes ----tty-stream-chunk-separator - ✔ b › b passes two ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 3 tests were pending in b.cjs - - ◌ b › b slow - ◌ b › b slow two - ◌ b › b slow three - ----tty-stream-chunk-separator - ─ - - 4 tests passed - 5 tests remained pending after a timeout ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutinsinglefile.v23.log b/test-tap/reporters/default.timeoutinsinglefile.v23.log deleted file mode 100644 index a1059e094..000000000 --- a/test-tap/reporters/default.timeoutinsinglefile.v23.log +++ /dev/null @@ -1,20 +0,0 @@ - ----tty-stream-chunk-separator - ✔ passes ----tty-stream-chunk-separator - ✔ passes two ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 2 tests were pending in a.cjs - - ◌ slow - ◌ slow two - ----tty-stream-chunk-separator - ─ - - 2 tests passed - 2 tests remained pending after a timeout ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutwithmatch.v23.log b/test-tap/reporters/default.timeoutwithmatch.v23.log deleted file mode 100644 index ae7070c95..000000000 --- a/test-tap/reporters/default.timeoutwithmatch.v23.log +++ /dev/null @@ -1,18 +0,0 @@ - ----tty-stream-chunk-separator - ✔ passes needle ----tty-stream-chunk-separator -  - ✘ Timed out while running tests - - 2 tests were pending in a.cjs - - ◌ slow needle - ◌ slow three needle - ----tty-stream-chunk-separator - ─ - - 1 test passed - 2 tests remained pending after a timeout ----tty-stream-chunk-separator diff --git a/test-tap/reporters/default.watch.v23.log b/test-tap/reporters/default.watch.v23.log deleted file mode 100644 index ae2dea44b..000000000 --- a/test-tap/reporters/default.watch.v23.log +++ /dev/null @@ -1,32 +0,0 @@ - ----tty-stream-chunk-separator - ✔ test › passes ----tty-stream-chunk-separator - ─ - - 1 test passed [17:19:12] - ----tty-stream-chunk-separator -──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ----tty-stream-chunk-separator - ----tty-stream-chunk-separator - ✔ test › passes ----tty-stream-chunk-separator - ─ - - 1 test passed [17:19:12] - 2 previous failures in test files that were not rerun - ----tty-stream-chunk-separator -──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ----tty-stream-chunk-separator - ----tty-stream-chunk-separator - ✔ test › passes ----tty-stream-chunk-separator - ─ - - 1 test passed [17:19:12] - ----tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.edgecases.v23.log b/test-tap/reporters/tap.edgecases.v23.log deleted file mode 100644 index ae0f6cb72..000000000 --- a/test-tap/reporters/tap.edgecases.v23.log +++ /dev/null @@ -1,42 +0,0 @@ -TAP version 13 ----tty-stream-chunk-separator -not ok 1 - ~/test-tap/fixture/report/edgecases/ast-syntax-error.cjs:3 - --- - name: SyntaxError - message: Unexpected token 'do' - at: 'const fn = do {' - ... ----tty-stream-chunk-separator -not ok 2 - ast-syntax-error.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator -not ok 3 - No tests found in ava-import-no-test-declaration.cjs ----tty-stream-chunk-separator -not ok 4 - TypeError: test is not a function - --- - name: TypeError - message: test is not a function - at: >- - Object. - (~/test-tap/fixture/report/edgecases/import-and-use-test-member.cjs:3:1) - ... ----tty-stream-chunk-separator -not ok 5 - import-and-use-test-member.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator -not ok 6 - No tests found in no-ava-import.cjs, make sure to import "ava" at the top of your test file ----tty-stream-chunk-separator -not ok 7 - Error: throws - --- - name: Error - message: throws - at: 'Object. (~/test-tap/fixture/report/edgecases/throws.cjs:1:7)' - ... ----tty-stream-chunk-separator -not ok 8 - throws.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - -1..0 -# tests 0 -# pass 0 -# fail 8 - ----tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.v23.log b/test-tap/reporters/tap.failfast.v23.log deleted file mode 100644 index 890fcfe73..000000000 --- a/test-tap/reporters/tap.failfast.v23.log +++ /dev/null @@ -1,17 +0,0 @@ -TAP version 13 ----tty-stream-chunk-separator -not ok 1 - a › fails - --- - name: AssertionError - assertion: t.fail() - message: Test failed via `t.fail()` - at: 'ExecutionContext.fail (/lib/assert.js:287:15)' - ... ----tty-stream-chunk-separator - -1..1 -# tests 1 -# pass 0 -# fail 1 - ----tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.v23.log b/test-tap/reporters/tap.failfast2.v23.log deleted file mode 100644 index d3212e69e..000000000 --- a/test-tap/reporters/tap.failfast2.v23.log +++ /dev/null @@ -1,19 +0,0 @@ -TAP version 13 ----tty-stream-chunk-separator -not ok 1 - a › fails - --- - name: AssertionError - assertion: t.fail() - message: Test failed via `t.fail()` - at: 'ExecutionContext.fail (/lib/assert.js:287:15)' - ... ----tty-stream-chunk-separator -# 1 test remaining in a.cjs ----tty-stream-chunk-separator - -1..2 -# tests 2 -# pass 0 -# fail 2 - ----tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.only.v23.log b/test-tap/reporters/tap.only.v23.log deleted file mode 100644 index 36f42b988..000000000 --- a/test-tap/reporters/tap.only.v23.log +++ /dev/null @@ -1,13 +0,0 @@ -TAP version 13 ----tty-stream-chunk-separator -ok 1 - a › only ----tty-stream-chunk-separator -ok 2 - b › passes ----tty-stream-chunk-separator - -1..2 -# tests 2 -# pass 2 -# fail 0 - ----tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.regular.v23.log b/test-tap/reporters/tap.regular.v23.log deleted file mode 100644 index 7686951e4..000000000 --- a/test-tap/reporters/tap.regular.v23.log +++ /dev/null @@ -1,258 +0,0 @@ -TAP version 13 ----tty-stream-chunk-separator -not ok 1 - TypeError: test.serial.test is not a function - --- - name: TypeError - message: test.serial.test is not a function - at: 'Object. (~/test-tap/fixture/report/regular/bad-test-chain.cjs:3:13)' - ... ----tty-stream-chunk-separator -not ok 2 - bad-test-chain.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator -not ok 3 - nested-objects › format with max depth 4 - --- - name: AssertionError - assertion: t.deepEqual() - details: - 'Difference (- actual, + expected):': |2- - { - a: { - b: { - foo: 'bar', - }, - }, - + c: { - + d: { - + e: { - + foo: 'bar', - + }, - + }, - + }, - } - message: '' - at: 'ExecutionContext.deepEqual (/lib/assert.js:339:15)' - ... ----tty-stream-chunk-separator -not ok 4 - nested-objects › format like with max depth 4 - --- - name: AssertionError - assertion: t.like() - details: - 'Difference (- actual, + expected):': |2- - { - a: { - b: { - - foo: 'bar', - + foo: 'qux', - }, - }, - } - message: '' - at: 'ExecutionContext.like (/lib/assert.js:391:15)' - ... ----tty-stream-chunk-separator -# output-in-hook › before hook ----tty-stream-chunk-separator -# output-in-hook › before hook ----tty-stream-chunk-separator -# before ----tty-stream-chunk-separator -# output-in-hook › beforeEach hook for passing test ----tty-stream-chunk-separator -# beforeEach ----tty-stream-chunk-separator -# output-in-hook › beforeEach hook for failing test ----tty-stream-chunk-separator -# beforeEach ----tty-stream-chunk-separator -ok 5 - output-in-hook › passing test ----tty-stream-chunk-separator -not ok 6 - output-in-hook › failing test - --- - name: AssertionError - assertion: t.fail() - message: Test failed via `t.fail()` - at: 'ExecutionContext.fail (/lib/assert.js:287:15)' - ... ----tty-stream-chunk-separator -# output-in-hook › afterEach hook for passing test ----tty-stream-chunk-separator -# afterEach ----tty-stream-chunk-separator -# output-in-hook › afterEach.always hook for failing test ----tty-stream-chunk-separator -# afterEachAlways ----tty-stream-chunk-separator -# output-in-hook › afterEach.always hook for passing test ----tty-stream-chunk-separator -# afterEachAlways ----tty-stream-chunk-separator -# output-in-hook › cleanup ----tty-stream-chunk-separator -# afterAlways ----tty-stream-chunk-separator -ok 7 - test › skip # SKIP ----tty-stream-chunk-separator -not ok 8 - test › todo # TODO ----tty-stream-chunk-separator -ok 9 - test › passes ----tty-stream-chunk-separator -not ok 10 - test › fails - --- - name: AssertionError - assertion: t.fail() - message: Test failed via `t.fail()` - at: 'ExecutionContext.fail (/lib/assert.js:287:15)' - ... ----tty-stream-chunk-separator -ok 11 - test › known failure ----tty-stream-chunk-separator -not ok 12 - test › no longer failing - --- - name: AssertionError - message: >- - Test was expected to fail, but succeeded, you should stop marking the test as - failing - at: 'Test.finish (/lib/test.js:633:28)' - ... ----tty-stream-chunk-separator -not ok 13 - test › logs -# hello -# world - --- - name: AssertionError - assertion: t.fail() - message: Test failed via `t.fail()` - at: 'ExecutionContext.fail (/lib/assert.js:287:15)' - ... ----tty-stream-chunk-separator -not ok 14 - test › formatted - --- - name: AssertionError - assertion: t.deepEqual() - details: - 'Difference (- actual, + expected):': |- - - 'foo' - + 'bar' - message: '' - at: 'ExecutionContext.deepEqual (/lib/assert.js:339:15)' - ... ----tty-stream-chunk-separator -not ok 15 - test › implementation throws non-error - --- - name: AssertionError - details: - 'Error thrown in test:': 'null' - message: Error thrown in test - at: 'Test.run (/lib/test.js:546:25)' - ... ----tty-stream-chunk-separator -not ok 16 - traces-in-t-throws › throws - --- - name: AssertionError - assertion: t.throws() - details: - 'Function threw unexpected exception:': |- - Error { - message: 'uh-oh', - } - 'Expected instance of:': 'Function TypeError {}' - message: '' - at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' - ... ----tty-stream-chunk-separator -not ok 17 - traces-in-t-throws › notThrows - --- - name: AssertionError - assertion: t.notThrows() - details: - 'Function threw:': |- - Error { - message: 'uh-oh', - } - message: '' - at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' - ... ----tty-stream-chunk-separator -not ok 18 - traces-in-t-throws › notThrowsAsync - --- - name: AssertionError - assertion: t.notThrowsAsync() - details: - 'Function threw:': |- - Error { - message: 'uh-oh', - } - message: '' - at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' - ... ----tty-stream-chunk-separator -not ok 19 - traces-in-t-throws › throwsAsync - --- - name: AssertionError - assertion: t.throwsAsync() - details: - 'Function threw synchronously. Use `t.throws()` instead:': |- - Error { - message: 'uh-oh', - } - message: '' - at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' - ... ----tty-stream-chunk-separator -not ok 20 - traces-in-t-throws › throwsAsync different error - --- - name: AssertionError - assertion: t.throwsAsync() - details: - 'Returned promise rejected with unexpected exception:': |- - Error { - message: 'uh-oh', - } - 'Expected instance of:': 'Function TypeError {}' - message: '' - at: >- - returnRejectedPromise - (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:8:24) - ... ----tty-stream-chunk-separator -ok 21 - uncaught-exception › passes ----tty-stream-chunk-separator -not ok 22 - Error: Can’t catch me - --- - name: Error - message: Can’t catch me - at: >- - Immediate. - (~/test-tap/fixture/report/regular/uncaught-exception.cjs:5:9) - ... ----tty-stream-chunk-separator -not ok 23 - uncaught-exception.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator -ok 24 - unhandled-rejection › passes ----tty-stream-chunk-separator -ok 25 - unhandled-rejection › unhandled non-error rejection ----tty-stream-chunk-separator -not ok 26 - Error: Can’t catch me - --- - name: Error - message: Can’t catch me - at: 'passes (~/test-tap/fixture/report/regular/unhandled-rejection.cjs:4:17)' - ... ----tty-stream-chunk-separator -not ok 27 - unhandled-rejection - --- - message: Non-native error - formatted: 'null' - ... ----tty-stream-chunk-separator -not ok 28 - unhandled-rejection.cjs exited with a non-zero exit code: 1 ----tty-stream-chunk-separator - -1..21 -# tests 20 -# pass 6 -# skip 1 -# fail 21 - ----tty-stream-chunk-separator From d5832ce3afd0298848f2e77611be89cd31067c0a Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Tue, 6 May 2025 22:08:49 +0200 Subject: [PATCH 2/2] Test with Node.js 24 --- .github/workflows/ci.yml | 2 +- package.json | 2 +- test-tap/reporters/default.edgecases.v24.log | 59 +++ test-tap/reporters/default.failfast.v24.log | 24 ++ test-tap/reporters/default.failfast2.v24.log | 24 ++ test-tap/reporters/default.only.v24.log | 10 + test-tap/reporters/default.regular.v24.log | 359 ++++++++++++++++++ .../default.timeoutcontextlogs.v24.log | 38 ++ .../default.timeoutinmultiplefiles.v24.log | 34 ++ .../default.timeoutinsinglefile.v24.log | 20 + .../default.timeoutwithmatch.v24.log | 18 + test-tap/reporters/default.watch.v24.log | 32 ++ test-tap/reporters/tap.edgecases.v24.log | 42 ++ test-tap/reporters/tap.failfast.v24.log | 17 + test-tap/reporters/tap.failfast2.v24.log | 19 + test-tap/reporters/tap.only.v24.log | 13 + test-tap/reporters/tap.regular.v24.log | 258 +++++++++++++ 17 files changed, 969 insertions(+), 2 deletions(-) create mode 100644 test-tap/reporters/default.edgecases.v24.log create mode 100644 test-tap/reporters/default.failfast.v24.log create mode 100644 test-tap/reporters/default.failfast2.v24.log create mode 100644 test-tap/reporters/default.only.v24.log create mode 100644 test-tap/reporters/default.regular.v24.log create mode 100644 test-tap/reporters/default.timeoutcontextlogs.v24.log create mode 100644 test-tap/reporters/default.timeoutinmultiplefiles.v24.log create mode 100644 test-tap/reporters/default.timeoutinsinglefile.v24.log create mode 100644 test-tap/reporters/default.timeoutwithmatch.v24.log create mode 100644 test-tap/reporters/default.watch.v24.log create mode 100644 test-tap/reporters/tap.edgecases.v24.log create mode 100644 test-tap/reporters/tap.failfast.v24.log create mode 100644 test-tap/reporters/tap.failfast2.v24.log create mode 100644 test-tap/reporters/tap.only.v24.log create mode 100644 test-tap/reporters/tap.regular.v24.log diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77919e412..e11eaa93b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [^18.18, ^20.8, ^22] + node-version: [^18.18, ^20.8, ^22, ^24] os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v4 diff --git a/package.json b/package.json index 79fbeaf4e..6d8071ee8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "type": "module", "engines": { - "node": "^18.18 || ^20.8 || ^22 || >=23" + "node": "^18.18 || ^20.8 || ^22 || ^23 || >=24" }, "scripts": { "test": "./scripts/test.sh" diff --git a/test-tap/reporters/default.edgecases.v24.log b/test-tap/reporters/default.edgecases.v24.log new file mode 100644 index 000000000..8b1c5dcdf --- /dev/null +++ b/test-tap/reporters/default.edgecases.v24.log @@ -0,0 +1,59 @@ + +---tty-stream-chunk-separator + ⚠ Could not parse ast-syntax-error.cjs for line number selection + + SyntaxError: Unexpected token (3:11) + +---tty-stream-chunk-separator + Uncaught exception in ast-syntax-error.cjs + + ~/test-tap/fixture/report/edgecases/ast-syntax-error.cjs:3 + const fn = do { + ^^ + + SyntaxError: Unexpected token 'do' + +---tty-stream-chunk-separator + ✘ ast-syntax-error.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✘ No tests found in ava-import-no-test-declaration.cjs +---tty-stream-chunk-separator + + Uncaught exception in import-and-use-test-member.cjs + + import-and-use-test-member.cjs:3 + + 2: +  3: test('pass', t => t.pass()); + 4: + + TypeError: test is not a function + + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.cjs:3:1) + +---tty-stream-chunk-separator + ✘ import-and-use-test-member.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✘ No tests found in no-ava-import.cjs, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator + ✘ Line numbers for test.cjs did not match any tests +---tty-stream-chunk-separator + + Uncaught exception in throws.cjs + + throws.cjs:1 + +  1: throw new Error('throws'); + 2: + + Error: throws + + › Object. (test-tap/fixture/report/edgecases/throws.cjs:1:7) + +---tty-stream-chunk-separator + ✘ throws.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ─ + + 3 uncaught exceptions +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.failfast.v24.log b/test-tap/reporters/default.failfast.v24.log new file mode 100644 index 000000000..1822d26dd --- /dev/null +++ b/test-tap/reporters/default.failfast.v24.log @@ -0,0 +1,24 @@ + +---tty-stream-chunk-separator + ✘ [fail]: a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + ─ + + a › fails + + a.cjs:3 + + 2: +  3: test('fails', t => t.fail()); + 4: + + Test failed via `t.fail()` + + › test-tap/fixture/report/failfast/a.cjs:3:22 + + ─ + + `--fail-fast` is on. 1 test file was skipped. + + 1 test failed +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.failfast2.v24.log b/test-tap/reporters/default.failfast2.v24.log new file mode 100644 index 000000000..29437d029 --- /dev/null +++ b/test-tap/reporters/default.failfast2.v24.log @@ -0,0 +1,24 @@ + +---tty-stream-chunk-separator + ✘ [fail]: a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + ─ + + a › fails + + a.cjs:3 + + 2: +  3: test('fails', t => t.fail());  + 4: test('passes', t => t.pass()); + + Test failed via `t.fail()` + + › test-tap/fixture/report/failfast2/a.cjs:3:22 + + ─ + + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. + + 1 test failed +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.only.v24.log b/test-tap/reporters/default.only.v24.log new file mode 100644 index 000000000..f01706e56 --- /dev/null +++ b/test-tap/reporters/default.only.v24.log @@ -0,0 +1,10 @@ + +---tty-stream-chunk-separator + ✔ a › only +---tty-stream-chunk-separator + ✔ b › passes +---tty-stream-chunk-separator + ─ + + 2 tests passed +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.regular.v24.log b/test-tap/reporters/default.regular.v24.log new file mode 100644 index 000000000..c65476560 --- /dev/null +++ b/test-tap/reporters/default.regular.v24.log @@ -0,0 +1,359 @@ + +---tty-stream-chunk-separator + Uncaught exception in bad-test-chain.cjs + + bad-test-chain.cjs:3 + + 2: +  3: test.serial.test('passes', t => t.pass()); + 4: + + TypeError: test.serial.test is not a function + + › Object. (test-tap/fixture/report/regular/bad-test-chain.cjs:3:13) + +---tty-stream-chunk-separator + ✘ bad-test-chain.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✘ [fail]: nested-objects › format with max depth 4 +---tty-stream-chunk-separator + ✘ [fail]: nested-objects › format like with max depth 4 +---tty-stream-chunk-separator + output-in-hook › before hook + ℹ before +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for passing test + ℹ beforeEach +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for failing test + ℹ beforeEach +---tty-stream-chunk-separator + ✔ output-in-hook › passing test +---tty-stream-chunk-separator + ✘ [fail]: output-in-hook › failing test Test failed via `t.fail()` +---tty-stream-chunk-separator + output-in-hook › afterEach hook for passing test + ℹ afterEach +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for failing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for passing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › cleanup + ℹ afterAlways +---tty-stream-chunk-separator + - [skip] test › skip +---tty-stream-chunk-separator + - [todo] test › todo +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ✘ [fail]: test › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + ✔ [expected fail] test › known failure +---tty-stream-chunk-separator + ✘ [unexpected pass]: test › no longer failing Test was expected to fail, but succeeded, you should stop marking the test as failing +---tty-stream-chunk-separator + ✘ [fail]: test › logs Test failed via `t.fail()` + ℹ hello + ℹ world +---tty-stream-chunk-separator + ✘ [fail]: test › formatted +---tty-stream-chunk-separator + ✘ [fail]: test › implementation throws non-error Error thrown in test +---tty-stream-chunk-separator + ✘ [fail]: traces-in-t-throws › throws +---tty-stream-chunk-separator + ✘ [fail]: traces-in-t-throws › notThrows +---tty-stream-chunk-separator + ✘ [fail]: traces-in-t-throws › notThrowsAsync +---tty-stream-chunk-separator + ✘ [fail]: traces-in-t-throws › throwsAsync +---tty-stream-chunk-separator + ✘ [fail]: traces-in-t-throws › throwsAsync different error +---tty-stream-chunk-separator + ✔ uncaught-exception › passes +---tty-stream-chunk-separator + + Uncaught exception in uncaught-exception.cjs + + uncaught-exception.cjs:5 + + 4: setImmediate(() => { +  5: throw new Error('Can’t catch me'); + 6: }); + + Error: Can’t catch me + + › Immediate. (test-tap/fixture/report/regular/uncaught-exception.cjs:5:9) + +---tty-stream-chunk-separator + ✘ uncaught-exception.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✔ unhandled-rejection › passes +---tty-stream-chunk-separator + ✔ unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator + + Unhandled rejection in unhandled-rejection.cjs + + unhandled-rejection.cjs:4 + + 3: const passes = t => { +  4: Promise.reject(new Error('Can’t catch me')); + 5: t.pass(); + + Error: Can’t catch me + + › passes (test-tap/fixture/report/regular/unhandled-rejection.cjs:4:17) + +---tty-stream-chunk-separator + Unhandled rejection in unhandled-rejection.cjs + + null + +---tty-stream-chunk-separator + ✘ unhandled-rejection.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ─ + + nested-objects › format with max depth 4 + + nested-objects.cjs:29 + + 28: }; +  29: t.deepEqual(exp, act); + 30: }); + + Difference (- actual, + expected): + + { + a: { + b: { + foo: 'bar', + }, + }, + + c: { + + d: { + + e: { + + foo: 'bar', + + }, + + }, + + }, + } + + › test-tap/fixture/report/regular/nested-objects.cjs:29:4 + + + + nested-objects › format like with max depth 4 + + nested-objects.cjs:55 + + 54: }; +  55: t.like(actual, pattern); + 56: }); + + Difference (- actual, + expected): + + { + a: { + b: { + - foo: 'bar', + + foo: 'qux', + }, + }, + } + + › test-tap/fixture/report/regular/nested-objects.cjs:55:4 + + + + output-in-hook › failing test + + output-in-hook.cjs:34 + + 33: test('failing test', t => { +  34: t.fail();  + 35: }); + + Test failed via `t.fail()` + + › test-tap/fixture/report/regular/output-in-hook.cjs:34:4 + + + + test › fails + + test.cjs:9 + + 8: +  9: test('fails', t => t.fail()); + 10: + + Test failed via `t.fail()` + + › test-tap/fixture/report/regular/test.cjs:9:22 + + + + test › no longer failing + + Test was expected to fail, but succeeded, you should stop marking the test as failing + + + + test › logs + test.cjs:18 + + 17: t.log('world'); +  18: t.fail();  + 19: }); + + Test failed via `t.fail()` + + › test-tap/fixture/report/regular/test.cjs:18:4 + + + + test › formatted + + test.cjs:22 + + 21: test('formatted', t => { +  22: t.deepEqual('foo', 'bar'); + 23: }); + + Difference (- actual, + expected): + + - 'foo' + + 'bar' + + › test-tap/fixture/report/regular/test.cjs:22:4 + + + + test › implementation throws non-error + + Error thrown in test: + + null + + + + traces-in-t-throws › throws + + traces-in-t-throws.cjs:12 + + 11: test('throws', t => { +  12: t.throws(() => throwError(), {instanceOf: TypeError}); + 13: }); + + Function threw unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) + › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.cjs:12:17) + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:12:4 + + + + traces-in-t-throws › notThrows + + traces-in-t-throws.cjs:16 + + 15: test('notThrows', t => { +  16: t.notThrows(() => throwError()); + 17: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:16:20 + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:16:4 + + + + traces-in-t-throws › notThrowsAsync + + traces-in-t-throws.cjs:20 + + 19: test('notThrowsAsync', async t => { +  20: await t.notThrowsAsync(() => throwError()); + 21: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:20:31 + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:20:10 + + + + traces-in-t-throws › throwsAsync + + traces-in-t-throws.cjs:24 + + 23: test('throwsAsync', async t => { +  24: await t.throwsAsync(() => throwError(), {instanceOf: TypeError}); + 25: }); + + Function threw synchronously. Use `t.throws()` instead: + + Error { + message: 'uh-oh', + } + + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8) + › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.cjs:24:28) + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:24:10 + + + + traces-in-t-throws › throwsAsync different error + + traces-in-t-throws.cjs:28 + + 27: test('throwsAsync different error', async t => { +  28: await t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); + 29: }); + + Returned promise rejected with unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.cjs:8:24) + › test-tap/fixture/report/regular/traces-in-t-throws.cjs:28:10 + + ─ + + 13 tests failed + 1 known failure + 1 test skipped + 1 test todo + 2 unhandled rejections + 2 uncaught exceptions +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutcontextlogs.v24.log b/test-tap/reporters/default.timeoutcontextlogs.v24.log new file mode 100644 index 000000000..04018664f --- /dev/null +++ b/test-tap/reporters/default.timeoutcontextlogs.v24.log @@ -0,0 +1,38 @@ + +---tty-stream-chunk-separator + ✔ a › a passes +---tty-stream-chunk-separator + ✔ a › a passes two +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 2 tests were pending in a.cjs + + ◌ a › a slow + ℹ this slow test prints useful debug message just text + ◌ a › a slow two + ℹ another useful debug message { +  x: 5, + } + +---tty-stream-chunk-separator + ✔ b › a passes +---tty-stream-chunk-separator + ✔ b › a passes two +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 2 tests were pending in b.cjs + + ◌ b › a slow + ℹ hello world + ◌ b › a slow two + +---tty-stream-chunk-separator + ─ + + 4 tests passed + 4 tests remained pending after a timeout +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutinmultiplefiles.v24.log b/test-tap/reporters/default.timeoutinmultiplefiles.v24.log new file mode 100644 index 000000000..f3a678ae2 --- /dev/null +++ b/test-tap/reporters/default.timeoutinmultiplefiles.v24.log @@ -0,0 +1,34 @@ + +---tty-stream-chunk-separator + ✔ a › a passes +---tty-stream-chunk-separator + ✔ a › a passes two +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 2 tests were pending in a.cjs + + ◌ a › a slow + ◌ a › a slow two + +---tty-stream-chunk-separator + ✔ b › b passes +---tty-stream-chunk-separator + ✔ b › b passes two +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 3 tests were pending in b.cjs + + ◌ b › b slow + ◌ b › b slow two + ◌ b › b slow three + +---tty-stream-chunk-separator + ─ + + 4 tests passed + 5 tests remained pending after a timeout +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutinsinglefile.v24.log b/test-tap/reporters/default.timeoutinsinglefile.v24.log new file mode 100644 index 000000000..a1059e094 --- /dev/null +++ b/test-tap/reporters/default.timeoutinsinglefile.v24.log @@ -0,0 +1,20 @@ + +---tty-stream-chunk-separator + ✔ passes +---tty-stream-chunk-separator + ✔ passes two +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 2 tests were pending in a.cjs + + ◌ slow + ◌ slow two + +---tty-stream-chunk-separator + ─ + + 2 tests passed + 2 tests remained pending after a timeout +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.timeoutwithmatch.v24.log b/test-tap/reporters/default.timeoutwithmatch.v24.log new file mode 100644 index 000000000..ae7070c95 --- /dev/null +++ b/test-tap/reporters/default.timeoutwithmatch.v24.log @@ -0,0 +1,18 @@ + +---tty-stream-chunk-separator + ✔ passes needle +---tty-stream-chunk-separator +  + ✘ Timed out while running tests + + 2 tests were pending in a.cjs + + ◌ slow needle + ◌ slow three needle + +---tty-stream-chunk-separator + ─ + + 1 test passed + 2 tests remained pending after a timeout +---tty-stream-chunk-separator diff --git a/test-tap/reporters/default.watch.v24.log b/test-tap/reporters/default.watch.v24.log new file mode 100644 index 000000000..ae2dea44b --- /dev/null +++ b/test-tap/reporters/default.watch.v24.log @@ -0,0 +1,32 @@ + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ─ + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ─ + + 1 test passed [17:19:12] + 2 previous failures in test files that were not rerun + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ─ + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.edgecases.v24.log b/test-tap/reporters/tap.edgecases.v24.log new file mode 100644 index 000000000..ae0f6cb72 --- /dev/null +++ b/test-tap/reporters/tap.edgecases.v24.log @@ -0,0 +1,42 @@ +TAP version 13 +---tty-stream-chunk-separator +not ok 1 - ~/test-tap/fixture/report/edgecases/ast-syntax-error.cjs:3 + --- + name: SyntaxError + message: Unexpected token 'do' + at: 'const fn = do {' + ... +---tty-stream-chunk-separator +not ok 2 - ast-syntax-error.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +not ok 3 - No tests found in ava-import-no-test-declaration.cjs +---tty-stream-chunk-separator +not ok 4 - TypeError: test is not a function + --- + name: TypeError + message: test is not a function + at: >- + Object. + (~/test-tap/fixture/report/edgecases/import-and-use-test-member.cjs:3:1) + ... +---tty-stream-chunk-separator +not ok 5 - import-and-use-test-member.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +not ok 6 - No tests found in no-ava-import.cjs, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator +not ok 7 - Error: throws + --- + name: Error + message: throws + at: 'Object. (~/test-tap/fixture/report/edgecases/throws.cjs:1:7)' + ... +---tty-stream-chunk-separator +not ok 8 - throws.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + +1..0 +# tests 0 +# pass 0 +# fail 8 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.v24.log b/test-tap/reporters/tap.failfast.v24.log new file mode 100644 index 000000000..890fcfe73 --- /dev/null +++ b/test-tap/reporters/tap.failfast.v24.log @@ -0,0 +1,17 @@ +TAP version 13 +---tty-stream-chunk-separator +not ok 1 - a › fails + --- + name: AssertionError + assertion: t.fail() + message: Test failed via `t.fail()` + at: 'ExecutionContext.fail (/lib/assert.js:287:15)' + ... +---tty-stream-chunk-separator + +1..1 +# tests 1 +# pass 0 +# fail 1 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.v24.log b/test-tap/reporters/tap.failfast2.v24.log new file mode 100644 index 000000000..d3212e69e --- /dev/null +++ b/test-tap/reporters/tap.failfast2.v24.log @@ -0,0 +1,19 @@ +TAP version 13 +---tty-stream-chunk-separator +not ok 1 - a › fails + --- + name: AssertionError + assertion: t.fail() + message: Test failed via `t.fail()` + at: 'ExecutionContext.fail (/lib/assert.js:287:15)' + ... +---tty-stream-chunk-separator +# 1 test remaining in a.cjs +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 0 +# fail 2 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.only.v24.log b/test-tap/reporters/tap.only.v24.log new file mode 100644 index 000000000..36f42b988 --- /dev/null +++ b/test-tap/reporters/tap.only.v24.log @@ -0,0 +1,13 @@ +TAP version 13 +---tty-stream-chunk-separator +ok 1 - a › only +---tty-stream-chunk-separator +ok 2 - b › passes +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 2 +# fail 0 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.regular.v24.log b/test-tap/reporters/tap.regular.v24.log new file mode 100644 index 000000000..7686951e4 --- /dev/null +++ b/test-tap/reporters/tap.regular.v24.log @@ -0,0 +1,258 @@ +TAP version 13 +---tty-stream-chunk-separator +not ok 1 - TypeError: test.serial.test is not a function + --- + name: TypeError + message: test.serial.test is not a function + at: 'Object. (~/test-tap/fixture/report/regular/bad-test-chain.cjs:3:13)' + ... +---tty-stream-chunk-separator +not ok 2 - bad-test-chain.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +not ok 3 - nested-objects › format with max depth 4 + --- + name: AssertionError + assertion: t.deepEqual() + details: + 'Difference (- actual, + expected):': |2- + { + a: { + b: { + foo: 'bar', + }, + }, + + c: { + + d: { + + e: { + + foo: 'bar', + + }, + + }, + + }, + } + message: '' + at: 'ExecutionContext.deepEqual (/lib/assert.js:339:15)' + ... +---tty-stream-chunk-separator +not ok 4 - nested-objects › format like with max depth 4 + --- + name: AssertionError + assertion: t.like() + details: + 'Difference (- actual, + expected):': |2- + { + a: { + b: { + - foo: 'bar', + + foo: 'qux', + }, + }, + } + message: '' + at: 'ExecutionContext.like (/lib/assert.js:391:15)' + ... +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator +# before +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for passing test +---tty-stream-chunk-separator +# beforeEach +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for failing test +---tty-stream-chunk-separator +# beforeEach +---tty-stream-chunk-separator +ok 5 - output-in-hook › passing test +---tty-stream-chunk-separator +not ok 6 - output-in-hook › failing test + --- + name: AssertionError + assertion: t.fail() + message: Test failed via `t.fail()` + at: 'ExecutionContext.fail (/lib/assert.js:287:15)' + ... +---tty-stream-chunk-separator +# output-in-hook › afterEach hook for passing test +---tty-stream-chunk-separator +# afterEach +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for failing test +---tty-stream-chunk-separator +# afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for passing test +---tty-stream-chunk-separator +# afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › cleanup +---tty-stream-chunk-separator +# afterAlways +---tty-stream-chunk-separator +ok 7 - test › skip # SKIP +---tty-stream-chunk-separator +not ok 8 - test › todo # TODO +---tty-stream-chunk-separator +ok 9 - test › passes +---tty-stream-chunk-separator +not ok 10 - test › fails + --- + name: AssertionError + assertion: t.fail() + message: Test failed via `t.fail()` + at: 'ExecutionContext.fail (/lib/assert.js:287:15)' + ... +---tty-stream-chunk-separator +ok 11 - test › known failure +---tty-stream-chunk-separator +not ok 12 - test › no longer failing + --- + name: AssertionError + message: >- + Test was expected to fail, but succeeded, you should stop marking the test as + failing + at: 'Test.finish (/lib/test.js:633:28)' + ... +---tty-stream-chunk-separator +not ok 13 - test › logs +# hello +# world + --- + name: AssertionError + assertion: t.fail() + message: Test failed via `t.fail()` + at: 'ExecutionContext.fail (/lib/assert.js:287:15)' + ... +---tty-stream-chunk-separator +not ok 14 - test › formatted + --- + name: AssertionError + assertion: t.deepEqual() + details: + 'Difference (- actual, + expected):': |- + - 'foo' + + 'bar' + message: '' + at: 'ExecutionContext.deepEqual (/lib/assert.js:339:15)' + ... +---tty-stream-chunk-separator +not ok 15 - test › implementation throws non-error + --- + name: AssertionError + details: + 'Error thrown in test:': 'null' + message: Error thrown in test + at: 'Test.run (/lib/test.js:546:25)' + ... +---tty-stream-chunk-separator +not ok 16 - traces-in-t-throws › throws + --- + name: AssertionError + assertion: t.throws() + details: + 'Function threw unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + message: '' + at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' + ... +---tty-stream-chunk-separator +not ok 17 - traces-in-t-throws › notThrows + --- + name: AssertionError + assertion: t.notThrows() + details: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + message: '' + at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' + ... +---tty-stream-chunk-separator +not ok 18 - traces-in-t-throws › notThrowsAsync + --- + name: AssertionError + assertion: t.notThrowsAsync() + details: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + message: '' + at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' + ... +---tty-stream-chunk-separator +not ok 19 - traces-in-t-throws › throwsAsync + --- + name: AssertionError + assertion: t.throwsAsync() + details: + 'Function threw synchronously. Use `t.throws()` instead:': |- + Error { + message: 'uh-oh', + } + message: '' + at: 'throwError (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:4:8)' + ... +---tty-stream-chunk-separator +not ok 20 - traces-in-t-throws › throwsAsync different error + --- + name: AssertionError + assertion: t.throwsAsync() + details: + 'Returned promise rejected with unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + message: '' + at: >- + returnRejectedPromise + (~/test-tap/fixture/report/regular/traces-in-t-throws.cjs:8:24) + ... +---tty-stream-chunk-separator +ok 21 - uncaught-exception › passes +---tty-stream-chunk-separator +not ok 22 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: >- + Immediate. + (~/test-tap/fixture/report/regular/uncaught-exception.cjs:5:9) + ... +---tty-stream-chunk-separator +not ok 23 - uncaught-exception.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +ok 24 - unhandled-rejection › passes +---tty-stream-chunk-separator +ok 25 - unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator +not ok 26 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: 'passes (~/test-tap/fixture/report/regular/unhandled-rejection.cjs:4:17)' + ... +---tty-stream-chunk-separator +not ok 27 - unhandled-rejection + --- + message: Non-native error + formatted: 'null' + ... +---tty-stream-chunk-separator +not ok 28 - unhandled-rejection.cjs exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + +1..21 +# tests 20 +# pass 6 +# skip 1 +# fail 21 + +---tty-stream-chunk-separator