diff --git a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.svg b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.svg index 8c0d26c933..5a9f61d666 100644 --- a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.svg +++ b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.svg @@ -1,6 +1,6 @@ - Qt Svg Document Generated with Qt @@ -11,14 +11,14 @@ - - + + - + (169ms) + > (143ms) at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:6:10) + > at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:10:10) at node:internal/test_runner/harness:248:12 + > at Test.postRun (node:internal/test_runner/test:955:19) at node:internal/process/task_queues:140:7 + > at node:internal/test_runner/test:792:31 at AsyncResource.runInAsyncScope (node:async_hooks:206:9) + > at node:internal/process/task_queues:140:7 at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) { + > at AsyncResource.runInAsyncScope (node:async_hooks:206:9) generatedMessage: true, + > at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) { code: 'ERR_ASSERTION', + > generatedMessage: true, actual: 1, + > code: 'ERR_ASSERTION', expected: 2, + > actual: 1, operator: 'strictEqual' + > expected: 2, operator: 'strictEqual' + + + + + + + +} - 2) describe only 2) describe only + it: - -AssertionError: Expected values to be strictly equal - -- Expected - -+ Received - + -- 2 - -+ 1 - - - - - at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:12:12) - - - @@ -463,7 +463,7 @@ font-family="Courier New" font-size="13" font-weight="400" font-style="normal" font-family="Courier New" font-size="13" font-weight="400" font-style="normal" > at Test.runInAsyncScope (node:async_hooks:206:9) + > at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:16:12) at Test.run (node:internal/test_runner/test:856:25) + > at Test.runInAsyncScope (node:async_hooks:206:9) at Test.start (node:internal/test_runner/test:753:17) + > at Test.run (node:internal/test_runner/test:856:25) at node:internal/test_runner/test:1215:71 + > at Test.start (node:internal/test_runner/test:753:17) at node:internal/per_context/primordials:488:82 + > at node:internal/test_runner/test:1215:71 at new Promise (<anonymous>) + > at node:internal/per_context/primordials:488:82 at new SafePromise (node:internal/per_context/primordials:456:29) + > at new Promise (<anonymous>) at node:internal/per_context/primordials:488:9 + > at new SafePromise (node:internal/per_context/primordials:456:29) at Array.map (<anonymous>) { + > at node:internal/per_context/primordials:488:9 generatedMessage: true, + > at Array.map (<anonymous>) { code: 'ERR_ASSERTION', + > generatedMessage: true, actual: 1, + > code: 'ERR_ASSERTION', expected: 2, + > actual: 1, operator: 'strictEqual' + > expected: 2, operator: 'strictEqual' + + + + + + + +} - 3) describe 3) describe + it only: - -AssertionError: Expected values to be strictly equal - -- Expected - -+ Received - + -- 2 - -+ 1 - - - - - at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:19:12) - - - @@ -765,7 +765,7 @@ font-family="Courier New" font-size="13" font-weight="400" font-style="normal" font-family="Courier New" font-size="13" font-weight="400" font-style="normal" > at Test.runInAsyncScope (node:async_hooks:206:9) + > at TestContext.<anonymous> (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:23:12) at Test.run (node:internal/test_runner/test:856:25) + > at Test.runInAsyncScope (node:async_hooks:206:9) at Test.start (node:internal/test_runner/test:753:17) + > at Test.run (node:internal/test_runner/test:856:25) at node:internal/test_runner/test:1215:71 + > at Test.start (node:internal/test_runner/test:753:17) at node:internal/per_context/primordials:488:82 + > at node:internal/test_runner/test:1215:71 at new Promise (<anonymous>) + > at node:internal/per_context/primordials:488:82 at new SafePromise (node:internal/per_context/primordials:456:29) + > at new Promise (<anonymous>) at node:internal/per_context/primordials:488:9 + > at new SafePromise (node:internal/per_context/primordials:456:29) at Array.map (<anonymous>) { + > at node:internal/per_context/primordials:488:9 generatedMessage: true, + > at Array.map (<anonymous>) { code: 'ERR_ASSERTION', + > generatedMessage: true, actual: 1, + > code: 'ERR_ASSERTION', expected: 2, + > actual: 1, operator: 'strictEqual' + > expected: 2, operator: 'strictEqual' + + + + + + + +} diff --git a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.txt b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.txt index ce279166aa..9863af2af0 100644 --- a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.txt +++ b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/result.txt @@ -8,7 +8,7 @@ 3) it only -0 passing (169ms) +0 passing (143ms) 3 failing 1) test only: @@ -20,11 +20,12 @@ - 2 + 1 -  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:6:10) +  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:10:10)  at Test.runInAsyncScope (node:async_hooks:206:9)  at Test.run (node:internal/test_runner/test:856:25)  at Test.processPendingSubtests (node:internal/test_runner/test:565:18) -  at node:internal/test_runner/harness:248:12 +  at Test.postRun (node:internal/test_runner/test:955:19) +  at node:internal/test_runner/test:792:31  at node:internal/process/task_queues:140:7  at AsyncResource.runInAsyncScope (node:async_hooks:206:9)  at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) { @@ -45,7 +46,7 @@ - 2 + 1 -  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:12:12) +  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:16:12)  at Test.runInAsyncScope (node:async_hooks:206:9)  at Test.run (node:internal/test_runner/test:856:25)  at Test.start (node:internal/test_runner/test:753:17) @@ -72,7 +73,7 @@ - 2 + 1 -  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:19:12) +  at TestContext. (integration-tests/fixture-tests/only-test-with-the-flag/test.ts:23:12)  at Test.runInAsyncScope (node:async_hooks:206:9)  at Test.run (node:internal/test_runner/test:856:25)  at Test.start (node:internal/test_runner/test:753:17) diff --git a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/test.ts b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/test.ts index cc6c60831a..a3a0383669 100644 --- a/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/test.ts +++ b/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test-with-the-flag/test.ts @@ -1,6 +1,10 @@ import assert from "node:assert/strict"; import { describe, it, test } from "node:test"; +test("test", async () => { + assert.equal(1, 1); +}); + /* eslint-disable-next-line no-only-tests/no-only-tests -- testing test.only explicitly */ test.only("test only", async () => { assert.equal(1, 2); @@ -18,4 +22,8 @@ describe("describe", async () => { it.only("it only", async () => { assert.equal(1, 2); }); + + it("it", async () => { + assert.equal(1, 1); + }); });