From 84d9851a6b2477e952c14a4b2e8cfb19a2cfd369 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Tue, 10 Sep 2024 23:39:07 +0300 Subject: [PATCH] test: update tests to reflect latest node updates --- .github/workflows/test.yaml | 2 +- package.json | 7 +- .../1e467e89966f1dc487140f1b18eaffad/0.json | 5 ++ .../1.json | 0 .../1e467e89966f1dc487140f1b18eaffad/2.json | 5 ++ .../3.json | 0 .../4.json | 0 .../1f0f93c51b9f571a9d899160525b1bcb/0.json | 5 -- .../1f0f93c51b9f571a9d899160525b1bcb/2.json | 5 -- .../dc3fc117f81a81ae79e191693864201a/0.json | 2 +- .../dc3fc117f81a81ae79e191693864201a/2.json | 2 +- .../0.json | 0 .../1.json | 0 .../2.json | 0 .../3.json | 0 .../dc3fc117f81a81ae79e191693864201a/0.json | 2 +- .../dc3fc117f81a81ae79e191693864201a/1.json | 2 +- .../0.json | 0 .../1.json | 0 .../2.json | 0 .../3.json | 0 .../4.json | 0 .../dc3fc117f81a81ae79e191693864201a/0.json | 2 +- .../dc3fc117f81a81ae79e191693864201a/1.json | 2 +- packages/testwatch/tests/index.test.js | 67 ++++++++++++------- yarn.lock | 39 +++++++++-- 26 files changed, 96 insertions(+), 51 deletions(-) create mode 100644 packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json rename packages/github/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/1.json (100%) create mode 100644 packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json rename packages/github/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/3.json (100%) rename packages/github/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/4.json (100%) delete mode 100644 packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json delete mode 100644 packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json rename packages/junit/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/0.json (100%) rename packages/junit/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/1.json (100%) rename packages/junit/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/2.json (100%) rename packages/junit/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/3.json (100%) rename packages/mocha/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/0.json (100%) rename packages/mocha/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/1.json (100%) rename packages/mocha/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/2.json (100%) rename packages/mocha/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/3.json (100%) rename packages/mocha/.snapshots/{1f0f93c51b9f571a9d899160525b1bcb => 1e467e89966f1dc487140f1b18eaffad}/4.json (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c8aa83c..497fede 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [v18, v20, v21] + node: [v18, v20, v22] steps: - uses: actions/checkout@v3 with: diff --git a/package.json b/package.json index 314d6f9..29c8291 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "scripts": { "mono": "c8 node scripts/mono-run.js", "test": "yarn mono test", + "test:clean-snapshots": "rm -rf packages/**/.snapshots", + "test:update-snapshots": "SNAP_UPDATE=1 yarn test", "lint": "eslint ." }, "workspaces": [ @@ -21,10 +23,11 @@ }, "homepage": "https://github.com/MoLow/reporters#readme", "devDependencies": { - "@matteo.collina/snap": "^0.2.1", + "@matteo.collina/snap": "^0.3.0", "c8": "^7.13.0", "eslint": "^7.32.0 || ^8.2.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.25.2" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json new file mode 100644 index 0000000..ea284bd --- /dev/null +++ b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "::debug::starting to run tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::starting to run fails\n::error title=fails,file=tests/example.js,line=9,col=11::Error [ERR_TEST_FAILURE]: this is an error%0A at async Promise.all (index 0) {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (CWD/tests/example.js:9:11)%0A at Test.runInAsyncScope (node:async_hooks:211:14)%0A at Test.run (node:internal/test_runner/test:887:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:584:18)%0A at Test.postRun (node:internal/test_runner/test:983:19)%0A at Test.run (node:internal/test_runner/test:926:12)%0A at async Promise.all (index 0)%0A at async Suite.run (node:internal/test_runner/test:1268:7)%0A at async startSubtestAfterBootstrap (node:internal/test_runner/harness:280:3)%0A}\n::debug::starting to run is a diagnostic\n::debug::completed running is a diagnostic\n::notice file=tests/example.js,line=11,col=3::this is a diagnostic\n::debug::starting to run should fail\n::error title=should fail,file=tests/example.js,line=12,col=31::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (CWD/tests/example.js:12:31)%0A at Test.runInAsyncScope (node:async_hooks:211:14)%0A at Test.run (node:internal/test_runner/test:887:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:584:18)%0A at Test.postRun (node:internal/test_runner/test:983:19)%0A at Test.run (node:internal/test_runner/test:926:12)%0A at async Suite.processPendingSubtests (node:internal/test_runner/test:584:7) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run more tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::completed running more tests\n::debug::starting to run is skipped\n::debug::completed running is skipped\n::debug::starting to run is a todo\n::debug::completed running is a todo\n::debug::starting to run top level diagnostic\n::debug::completed running top level diagnostic\n::notice file=tests/example.js,line=21,col=1::top level diagnostic\n::group::Test results (4 passed, 2 failed)\n::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 1%0ATodo 📝: 1%0ADuration 🕐: *ms\n::endgroup::\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json similarity index 100% rename from packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json rename to packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json diff --git a/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json new file mode 100644 index 0000000..38def42 --- /dev/null +++ b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "::debug::starting to run should fail\n::error title=should fail,file=tests/example.mjs,line=5,col=3::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (file://CWD/tests/example.mjs:5:3)%0A at Test.runInAsyncScope (node:async_hooks:211:14)%0A at Test.run (node:internal/test_runner/test:887:25)%0A at Test.start (node:internal/test_runner/test:786:17)%0A at startSubtestAfterBootstrap (node:internal/test_runner/harness:280:17) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run should pass\n::debug::completed running should pass\n::group::Test results (1 passed, 1 failed)\n::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 0%0ATodo 📝: 0%0ADuration 🕐: *ms\n::endgroup::\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json similarity index 100% rename from packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json rename to packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json diff --git a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json b/packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/4.json similarity index 100% rename from packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json rename to packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/4.json diff --git a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json b/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json deleted file mode 100644 index 45fae9b..0000000 --- a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "stderr": "", - "stdout": "::debug::starting to run tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::starting to run fails\n::error title=fails,file=tests/example.js,line=9,col=11::Error [ERR_TEST_FAILURE]: this is an error%0A at async Promise.all (index 0) {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (CWD/tests/example.js:9:11)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:639:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:382:18)%0A at Test.postRun (node:internal/test_runner/test:730:19)%0A at Test.run (node:internal/test_runner/test:688:12)%0A at async Promise.all (index 0)%0A at async Suite.run (node:internal/test_runner/test:964:7)%0A at async startSubtest (node:internal/test_runner/harness:218:3)%0A}\n::debug::starting to run is a diagnostic\n::debug::completed running is a diagnostic\n::notice file=tests/example.js,line=11,col=3::this is a diagnostic\n::debug::starting to run should fail\n::error title=should fail,file=tests/example.js,line=12,col=31::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (CWD/tests/example.js:12:31)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:639:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:382:18)%0A at Test.postRun (node:internal/test_runner/test:730:19)%0A at Test.run (node:internal/test_runner/test:688:12)%0A at async Suite.processPendingSubtests (node:internal/test_runner/test:382:7) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run more tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::completed running more tests\n::debug::starting to run is skipped\n::debug::completed running is skipped\n::debug::starting to run is a todo\n::debug::completed running is a todo\n::debug::starting to run top level diagnostic\n::debug::completed running top level diagnostic\n::notice file=tests/example.js,line=21,col=1::top level diagnostic\n::group::Test results (4 passed, 2 failed)\n::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 1%0ATodo 📝: 1%0ADuration 🕐: *ms\n::endgroup::\n", - "exitCode": 1 -} \ No newline at end of file diff --git a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json b/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json deleted file mode 100644 index 23d6841..0000000 --- a/packages/github/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "stderr": "", - "stdout": "::debug::starting to run should fail\n::error title=should fail,file=tests/example.mjs,line=5,col=3::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (file://CWD/tests/example.mjs:5:3)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:639:25)%0A at Test.start (node:internal/test_runner/test:550:17)%0A at startSubtest (node:internal/test_runner/harness:218:17) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run should pass\n::debug::completed running should pass\n::group::Test results (1 passed, 1 failed)\n::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 0%0ATodo 📝: 0%0ADuration 🕐: *ms\n::endgroup::\n", - "exitCode": 1 -} \ No newline at end of file diff --git a/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json b/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json index af52572..e9d0d52 100644 --- a/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json +++ b/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "::debug::starting to run tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::starting to run fails\n::error title=fails,file=tests/example.js,line=9,col=11::[Error [ERR_TEST_FAILURE]: this is an error] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (CWD/tests/example.js:9:11)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:631:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:374:18)%0A at Test.postRun (node:internal/test_runner/test:715:19)%0A at Test.run (node:internal/test_runner/test:673:12)%0A at async Promise.all (index 0)%0A at async Suite.run (node:internal/test_runner/test:948:7)%0A at async startSubtest (node:internal/test_runner/harness:216:3)%0A}\n::debug::starting to run is a diagnostic\n::debug::completed running is a diagnostic\n::notice file=tests/example.js,line=11,col=3::this is a diagnostic\n::debug::starting to run should fail\n::error title=should fail,file=tests/example.js,line=12,col=31::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (CWD/tests/example.js:12:31)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:631:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:374:18)%0A at Test.postRun (node:internal/test_runner/test:715:19)%0A at Test.run (node:internal/test_runner/test:673:12)%0A at async Suite.processPendingSubtests (node:internal/test_runner/test:374:7) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run more tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::completed running more tests\n::debug::starting to run is skipped\n::debug::completed running is skipped\n::debug::starting to run is a todo\n::debug::completed running is a todo\n::debug::starting to run top level diagnostic\n::debug::completed running top level diagnostic\n::notice file=tests/example.js,line=21,col=1::top level diagnostic\n::group::Test results (4 passed, 2 failed)\n::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 1%0ATodo 📝: 1%0ADuration 🕐: *ms\n::endgroup::\n", + "stdout": "::debug::starting to run tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::starting to run fails\n::error title=fails,file=tests/example.js,line=9,col=11::Error [ERR_TEST_FAILURE]: this is an error%0A at async Promise.all (index 0) {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (CWD/tests/example.js:9:11)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:789:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:517:18)%0A at Test.postRun (node:internal/test_runner/test:885:19)%0A at Test.run (node:internal/test_runner/test:831:12)%0A at async Promise.all (index 0)%0A at async Suite.run (node:internal/test_runner/test:1131:7)%0A at async Test.processPendingSubtests (node:internal/test_runner/test:517:7)%0A}\n::debug::starting to run is a diagnostic\n::debug::completed running is a diagnostic\n::notice file=tests/example.js,line=11,col=3::this is a diagnostic\n::debug::starting to run should fail\n::error title=should fail,file=tests/example.js,line=12,col=31::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (CWD/tests/example.js:12:31)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:789:25)%0A at Suite.processPendingSubtests (node:internal/test_runner/test:517:18)%0A at Test.postRun (node:internal/test_runner/test:885:19)%0A at Test.run (node:internal/test_runner/test:831:12)%0A at async Suite.processPendingSubtests (node:internal/test_runner/test:517:7) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run more tests\n::debug::starting to run is ok\n::debug::completed running is ok\n::debug::completed running more tests\n::debug::starting to run is skipped\n::debug::completed running is skipped\n::debug::starting to run is a todo\n::debug::completed running is a todo\n::debug::starting to run top level diagnostic\n::debug::completed running top level diagnostic\n::notice file=tests/example.js,line=21,col=1::top level diagnostic\n::group::Test results (4 passed, 2 failed)\n::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 1%0ATodo 📝: 1%0ADuration 🕐: *ms\n::endgroup::\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json b/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json index 83b5627..c51c75a 100644 --- a/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json +++ b/packages/github/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "::debug::starting to run should fail\n::error title=should fail,file=tests/example.mjs,line=5,col=3::[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (file://CWD/tests/example.mjs:5:3)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:631:25)%0A at Test.start (node:internal/test_runner/test:542:17)%0A at startSubtest (node:internal/test_runner/harness:216:17) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run should pass\n::debug::completed running should pass\n::group::Test results (1 passed, 1 failed)\n::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 0%0ATodo 📝: 0%0ADuration 🕐: *ms\n::endgroup::\n", + "stdout": "::debug::starting to run should fail\n::error title=should fail,file=tests/example.mjs,line=5,col=3::Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:%0A%0A assert(false)%0A%0A at AsyncResource.runInAsyncScope (node:async_hooks:206:9) {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext. (file://CWD/tests/example.mjs:5:3)%0A at Test.runInAsyncScope (node:async_hooks:206:9)%0A at Test.run (node:internal/test_runner/test:789:25)%0A at Test.processPendingSubtests (node:internal/test_runner/test:517:18)%0A at node:internal/test_runner/harness:252:12%0A at node:internal/process/task_queues:140:7%0A at AsyncResource.runInAsyncScope (node:async_hooks:206:9)%0A at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A }%0A}\n::debug::starting to run should pass\n::debug::completed running should pass\n::group::Test results (1 passed, 1 failed)\n::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled đŸšĢ: 0%0ASkipped ⏭ī¸: 0%0ATodo 📝: 0%0ADuration 🕐: *ms\n::endgroup::\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json b/packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json similarity index 100% rename from packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json rename to packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json diff --git a/packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json b/packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json similarity index 100% rename from packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json rename to packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json diff --git a/packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json b/packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json similarity index 100% rename from packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json rename to packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json diff --git a/packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json b/packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json similarity index 100% rename from packages/junit/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json rename to packages/junit/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json diff --git a/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json b/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json index 303b4db..4d44ab7 100644 --- a/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json +++ b/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "\n\n\t\n\t\t\n\t\t\n\t\t\t\n[Error [ERR_TEST_FAILURE]: this is an error] {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: Error: this is an error\n *\n *\n *\n *\n *\n *\n at async Promise.all (index 0)\n *\n *\n}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n] {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:\n \n assert(false)\n \n *\n *\n *\n *\n *\n *\n * {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: false,\n expected: true,\n operator: '=='\n }\n}\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\n", + "stdout": "\n\n\t\n\t\t\n\t\t\n\t\t\t\nError [ERR_TEST_FAILURE]: this is an error\n at async Promise.all (index 0) {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: Error: this is an error\n *\n *\n *\n *\n *\n *\n at async Promise.all (index 0)\n *\n *\n}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n] {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:\n \n assert(false)\n \n *\n *\n *\n *\n *\n *\n * {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: false,\n expected: true,\n operator: '=='\n }\n}\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json b/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json index 8412e9d..60a3f6d 100644 --- a/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json +++ b/packages/junit/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "\n\n\t\n\t\t\n[Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n] {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:\n \n assert(false)\n \n *\n *\n *\n *\n * {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: false,\n expected: true,\n operator: '=='\n }\n}\n\t\t\n\t\n\t\n\n", + "stdout": "\n\n\t\n\t\t\nError [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n * {\n code: 'ERR_TEST_FAILURE',\n failureType: 'testCodeFailure',\n cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:\n \n assert(false)\n \n *\n *\n *\n *\n *\n *\n *\n * {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: false,\n expected: true,\n operator: '=='\n }\n}\n\t\t\n\t\n\t\n\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json b/packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json similarity index 100% rename from packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json rename to packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json b/packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json similarity index 100% rename from packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json rename to packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json b/packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json similarity index 100% rename from packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json rename to packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json b/packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json similarity index 100% rename from packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json rename to packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json b/packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/4.json similarity index 100% rename from packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json rename to packages/mocha/.snapshots/1e467e89966f1dc487140f1b18eaffad/4.json diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json index 699c53d..8f79c1a 100644 --- a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "\n\n tests\n ✔ is ok\n 1) fails\n ✔ is a diagnostic\n 2) should fail\n\n more tests\n ✔ is ok\n\n - is skipped\n - is a todo\n ✔ top level diagnostic\n\n 4 passing (*ms)\n 2 pending\n 2 failing\n\n 1) \n tests\n fails:\n Error [ERR_TEST_FAILURE]: this is an error\n \n\n 2) \n tests\n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "stdout": "\n\n tests\n ✔ is ok\n 1) fails\n ✔ is a diagnostic\n 2) should fail\n\n more tests\n ✔ is ok\n\n - is skipped\n - is a todo\n ✔ top level diagnostic\n\n 4 passing (*ms)\n 2 pending\n 2 failing\n\n 1) \n tests\n fails:\n Error [ERR_TEST_FAILURE]: this is an error\n at async Promise.all (index 0)\n\n 2) \n tests\n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json index b04c233..bc9b115 100644 --- a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json @@ -1,5 +1,5 @@ { "stderr": "", - "stdout": "\n\n 1) should fail\n ✔ should pass\n\n 1 passing (*ms)\n 1 failing\n\n 1) \n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "stdout": "\n\n 1) should fail\n ✔ should pass\n\n 1 passing (*ms)\n 1 failing\n\n 1) \n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n *\n\n\n\n", "exitCode": 1 } \ No newline at end of file diff --git a/packages/testwatch/tests/index.test.js b/packages/testwatch/tests/index.test.js index f599412..4966bf7 100644 --- a/packages/testwatch/tests/index.test.js +++ b/packages/testwatch/tests/index.test.js @@ -6,7 +6,7 @@ const { once } = require('node:events'); const assert = require('node:assert'); const path = require('node:path'); const chalk = require('chalk'); -const { isSupported } = require('../nodeVersion'); +const { isSupported, major } = require('../nodeVersion'); const clear = '\x1Bc'; const esc = '\x1b'; @@ -17,6 +17,16 @@ const testsRun = [ `✔ index - sum (*ms) ✔ index - subtraction (*ms)`, ]; +const summary = major > 18 ? `\ +ℹ tests 4 +ℹ suites 0 +ℹ pass 4 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms (*ms) +` : ''; const tests = `${testsRun[0]}\n${testsRun[1]}`; const mainMenu = ` REPL Usage @@ -91,13 +101,13 @@ async function spawnInteractive(commandSequence = 'q', args = []) { return new Promise((resolve, reject) => { child.on('close', async (code, signal) => { - const outputs = stdout.replace(/\(.*ms\)/g, '(*ms)').split(clear); + const outputs = stdout.replace(/\(.*ms\)/g, '(*ms)').replace(/ℹ duration_ms .*\n/g, 'ℹ duration_ms (*ms)\n').split(clear); resolve({ code, signal, stderr, outputs, }); }); child.on('error', (code, signal) => { - const outputs = stdout.replace(/\(.*ms\)/g, '(*ms)').split(clear); + const outputs = stdout.replace(/\(.*ms\)/g, '(*ms)').replace(/ℹ duration_ms .*\n/g, 'ℹ duration_ms (*ms)\n').split(clear); // eslint-disable-next-line prefer-promise-reject-errors reject({ code, signal, stderr, outputs, @@ -110,17 +120,17 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod it('should run all tests on initialization', async () => { const { outputs, stderr } = await spawnInteractive('q'); assert.strictEqual(stderr, ''); - assert.deepStrictEqual(outputs, ['', '', `${tests}\n${mainMenu}\n`]); + assert.deepStrictEqual(outputs, ['', '', `${tests}\n${summary}${mainMenu}\n`]); }); it('should handle CTR + C', async () => { const { outputs, stderr } = await spawnInteractive('\x03'); assert.strictEqual(stderr, ''); - assert.deepStrictEqual(outputs, ['', '', `${tests}\n${mainMenu}\n`]); + assert.deepStrictEqual(outputs, ['', '', `${tests}\n${summary}${mainMenu}\n`]); }); it('should handle CTR + D', async () => { const { outputs, stderr } = await spawnInteractive('\x04'); assert.strictEqual(stderr, ''); - assert.deepStrictEqual(outputs, ['', '', `${tests}\n${mainMenu}\n`]); + assert.deepStrictEqual(outputs, ['', '', `${tests}\n${summary}${mainMenu}\n`]); }); it('should exit on sigkill', async () => { const child = spawn(process.execPath, ['../../index.js'], { @@ -142,12 +152,12 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod it('should run all tests on "a"', async () => { const { outputs, stderr } = await spawnInteractive('aq'); assert.strictEqual(stderr, ''); - assert.deepStrictEqual(outputs, ['', '', `${tests}\n${mainMenu}`, '', `${tests}\n${compactMenu}\n`]); + assert.deepStrictEqual(outputs, ['', '', `${tests}\n${summary}${mainMenu}`, '', `${tests}\n${summary}${compactMenu}\n`]); }); it('should run all tests on Enter', async () => { const { outputs, stderr } = await spawnInteractive('\rq'); assert.strictEqual(stderr, ''); - assert.deepStrictEqual(outputs, ['', '', `${tests}\n${mainMenu}`, '', `${tests}\n${compactMenu}\n`]); + assert.deepStrictEqual(outputs, ['', '', `${tests}\n${summary}${mainMenu}`, '', `${tests}\n${summary}${compactMenu}\n`]); }); it('should show full menu on "w" after running tests', async () => { const { outputs, stderr } = await spawnInteractive('awq'); @@ -155,9 +165,9 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, '', - `${tests}\n${compactMenu}\n${clearLines}${mainMenu}\n`, + `${tests}\n${summary}${compactMenu}\n${clearLines}${mainMenu}\n`, ]); }); @@ -165,18 +175,19 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod it('should filter tests on "t"', async () => { const { outputs, stderr } = await spawnInteractive(['t', 'sub', '\r', 'w', 'q'].join('')); const activeFilters = '\nActive Filters: test name /sub/\n'; + const tests1 = tests + .replace('✔ j - sum (*ms)\n', major >= 22 ? '' : 'īšŖ j - sum (*ms) # test name does not match pattern\n') + .replace('✔ index - sum (*ms)\n', major >= 22 ? '' : 'īšŖ index - sum (*ms) # test name does not match pattern\n'); + const summary1 = summary.replace('ℹ pass 4', 'ℹ pass 2').replace('ℹ skipped 0', major >= 22 ? 'ℹ skipped 0' : 'ℹ skipped 2').replace('ℹ tests 4', major >= 22 ? 'ℹ tests 2' : 'ℹ tests 4'); assert.strictEqual(stderr, ''); assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, `${filterTestsPrompt}sub`, '', '', - `${tests - .replace('✔ j - sum (*ms)', 'īšŖ j - sum (*ms) # test name does not match pattern') - .replace('✔ index - sum (*ms)', 'īšŖ index - sum (*ms) # test name does not match pattern') - }\n${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, + `${tests1}\n${summary1}${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, ]); }); @@ -195,11 +206,12 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod it('should set first argument as file filter', async () => { const { outputs, stderr } = await spawnInteractive('q', ['ind']); const activeFilters = '\nActive Filters: file name **/ind*.*\n'; + const summary1 = summary.replace('ℹ tests 4', 'ℹ tests 2').replace('ℹ pass 4', 'ℹ pass 2'); assert.strictEqual(stderr, ''); assert.deepStrictEqual(outputs, [ '', '', - `${testsRun[1]}\n${activeFilters}${mainMenuWithFilters}\n`, + `${testsRun[1]}\n${summary1}${activeFilters}${mainMenuWithFilters}\n`, ]); }); @@ -207,14 +219,15 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod const { outputs, stderr } = await spawnInteractive(['p', 'index', '\r', 'w', 'q'].join('')); const activeFilters = '\nActive Filters: file name **/index*.*\n'; assert.strictEqual(stderr, ''); + const summary1 = summary.replace('ℹ tests 4', 'ℹ tests 2').replace('ℹ pass 4', 'ℹ pass 2'); assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, `${filterFilesPrompt}index`, '', '', - `${testsRun[1]}\n${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, + `${testsRun[1]}\n${summary1}${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, ]); }); @@ -222,14 +235,15 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod const { outputs, stderr } = await spawnInteractive(['p', 'ind', '\r', 'w', 'q'].join('')); const activeFilters = '\nActive Filters: file name **/ind*.*\n'; assert.strictEqual(stderr, ''); + const summary1 = summary.replace('ℹ tests 4', 'ℹ tests 2').replace('ℹ pass 4', 'ℹ pass 2'); assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, `${filterFilesPrompt}ind`, '', '', - `${testsRun[1]}\n${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, + `${testsRun[1]}\n${summary1}${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, ]); }); }); @@ -238,7 +252,10 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod const activeFilters = '\nActive Filters: file name **/index*.*, test name /sum/\n'; assert.strictEqual(stderr, ''); assert.strictEqual(outputs.length, 11); - assert.strictEqual(outputs[10], `${testsRun[1].replace('✔ index - subtraction (*ms)', 'īšŖ index - subtraction (*ms) # test name does not match pattern')}\n${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`); + const tests1 = testsRun[1].replace('✔ index - subtraction (*ms)', major >= 22 ? '' : 'īšŖ index - subtraction (*ms) # test name does not match pattern'); + const newLine = major >= 22 ? '' : '\n'; + const summary1 = summary.replace('ℹ tests 4', major >= 22 ? 'ℹ tests 1' : 'ℹ tests 2').replace('ℹ pass 4', 'ℹ pass 1').replace('ℹ skipped 0', major >= 22 ? 'ℹ skipped 0' : 'ℹ skipped 1'); + assert.strictEqual(outputs[10], `${tests1}${newLine}${summary1}${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`); }); it('should mention when no files found', async () => { @@ -249,7 +266,7 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, `${filterFilesPrompt}nothing`, '', `${notFound}\n${compactMenu}\n${clearLines}${activeFilters}${mainMenuWithFilters}\n`, @@ -264,7 +281,7 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod assert.match(outputs[6], /Active Filters: file name \*\*\/index\*\.\*/); assert.match(outputs[7], /Active Filters: file name \*\*\/index\*\.\*/); assert.match(outputs[10], /Active Filters: file name \*\*\/index\*\.\*, test name \/sum\//); - assert.strictEqual(outputs[12], `${tests}\n${compactMenu}\n${clearLines}${mainMenu}\n`); + assert.strictEqual(outputs[12], `${tests}\n${summary}${compactMenu}\n${clearLines}${mainMenu}\n`); }); it('prompt ESC should preserve previous state', async () => { @@ -274,11 +291,11 @@ describe('testwatch', { concurrency: true, skip: !isSupported ? 'unsupported nod assert.deepStrictEqual(outputs, [ '', '', - `${tests}\n${mainMenu}`, + `${tests}\n${summary}${mainMenu}`, `${filterFilesPrompt}`, '', '', - `${tests}\n${compactMenu}`, + `${tests}\n${summary}${compactMenu}`, `${filterFilesPrompt}filter`, '', `${notFound}\n${compactMenu}`, diff --git a/yarn.lock b/yarn.lock index 1795546..dbbd7da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -91,10 +91,10 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@matteo.collina/snap@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@matteo.collina/snap/-/snap-0.2.1.tgz#597b2aaa27098930d7e54b9f8fa4fb0bab2e0783" - integrity sha512-rXCDKwOhAHzjmHUxEjKcmhvuhzF6gY0JWhpol9lTA+n5V1yTrbKNHNCe5ovxZjPw25PusmIEbYBIswC3ZUjhNQ== +"@matteo.collina/snap@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@matteo.collina/snap/-/snap-0.3.0.tgz#43bbdaa05a6aa90a77dd75992e732bc1c164b15b" + integrity sha512-CtoSZVegbLSMOoDjy+5TCZFY6juqSpc7P7slP5hx5jTu28ncvouAf1QrBqeLuPimIonU+ekbtkNNOlIl/a6GFw== dependencies: find-up "^7.0.0" slash "^5.1.0" @@ -1538,7 +1538,16 @@ stack-utils@^2.0.6: dependencies: escape-string-regexp "^2.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -1574,7 +1583,14 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -1729,7 +1745,16 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==