-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: use human readable snapshots (#127)
- Loading branch information
Showing
95 changed files
with
1,246 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,13 @@ | |
}, | ||
"homepage": "https://github.com/MoLow/reporters#readme", | ||
"devDependencies": { | ||
"@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" | ||
"eslint-plugin-import": "^2.25.2", | ||
"find-up": "^7.0.0", | ||
"pretty-format": "^29.7.0", | ||
"slash": "^5.1.0" | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/bail/.snapshots/bc72bb2843f04838a97cba748b6c200f/0.json
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
packages/bail/.snapshots/bc72bb2843f04838a97cba748b6c200f/0.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Object { | ||
"exitCode": 0, | ||
"stderr": "", | ||
"stdout": ". | ||
", | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/bail/.snapshots/bc72bb2843f04838a97cba748b6c200f/1.json
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
packages/bail/.snapshots/bc72bb2843f04838a97cba748b6c200f/1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Object { | ||
"exitCode": 7, | ||
"stderr": "node:internal/test_runner/harness:* | ||
throw err; | ||
^ | ||
|
||
Error: Bail | ||
* | ||
at bail.next (<anonymous>) | ||
* | ||
* | ||
* | ||
* | ||
* | ||
* | ||
* | ||
* | ||
Emitted 'error' event on Duplex instance at: | ||
* | ||
* | ||
* | ||
|
||
Node.js * | ||
", | ||
"stdout": "X | ||
[31m✖ Bailing on failed test: fail[0m | ||
", | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.json
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/0.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Object { | ||
"exitCode": 1, | ||
"stderr": "", | ||
"stdout": "::debug::starting to run tests | ||
::debug::starting to run is ok | ||
::debug::completed running is ok | ||
::debug::starting to run fails | ||
::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.<anonymous> (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} | ||
::debug::starting to run is a diagnostic | ||
::debug::completed running is a diagnostic | ||
::notice file=tests/example.js,line=11,col=3::this is a diagnostic | ||
::debug::starting to run should fail | ||
::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.<anonymous> (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} | ||
::debug::starting to run more tests | ||
::debug::starting to run is ok | ||
::debug::completed running is ok | ||
::debug::completed running more tests | ||
::debug::starting to run is skipped | ||
::debug::completed running is skipped | ||
::debug::starting to run is a todo | ||
::debug::completed running is a todo | ||
::debug::starting to run top level diagnostic | ||
::debug::completed running top level diagnostic | ||
::notice file=tests/example.js,line=21,col=1::top level diagnostic | ||
::group::Test results (4 passed, 2 failed) | ||
::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: *ms | ||
::endgroup:: | ||
", | ||
} |
1 change: 0 additions & 1 deletion
1
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.json
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Test Results</h1> | ||
<table><tr><td>Total Tests</td><td>8</td></tr><tr><td>Suites 📂</td><td>2</td></tr><tr><td>Passed ✅</td><td>4</td></tr><tr><td>Failed ❌</td><td>2</td></tr><tr><td>Canceled 🚫</td><td>0</td></tr><tr><td>Skipped ⏭️</td><td>1</td></tr><tr><td>Todo 📝</td><td>1</td></tr><tr><td>Duration 🕐</td><td>*ms</td></tr></table> |
5 changes: 0 additions & 5 deletions
5
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Object { | ||
"exitCode": 1, | ||
"stderr": "", | ||
"stdout": "::debug::starting to run should fail | ||
::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.<anonymous> (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} | ||
::debug::starting to run should pass | ||
::debug::completed running should pass | ||
::group::Test results (1 passed, 1 failed) | ||
::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration 🕐: *ms | ||
::endgroup:: | ||
", | ||
} |
1 change: 0 additions & 1 deletion
1
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.json
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
packages/github/.snapshots/1e467e89966f1dc487140f1b18eaffad/3.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Test Results</h1> | ||
<table><tr><td>Total Tests</td><td>2</td></tr><tr><td>Suites 📂</td><td>0</td></tr><tr><td>Passed ✅</td><td>1</td></tr><tr><td>Failed ❌</td><td>1</td></tr><tr><td>Canceled 🚫</td><td>0</td></tr><tr><td>Skipped ⏭️</td><td>0</td></tr><tr><td>Todo 📝</td><td>0</td></tr><tr><td>Duration 🕐</td><td>*ms</td></tr></table> |
4 changes: 2 additions & 2 deletions
4
...s/bc72bb2843f04838a97cba748b6c200f/0.json → ...s/1e467e89966f1dc487140f1b18eaffad/4.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
Object { | ||
"exitCode": 1, | ||
"stderr": "", | ||
"stdout": "", | ||
"exitCode": 1 | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/0.json
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/0.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Object { | ||
"exitCode": 1, | ||
"stderr": "", | ||
"stdout": "::debug::starting to run tests | ||
::debug::starting to run is ok | ||
::debug::completed running is ok | ||
::debug::starting to run fails | ||
::error title=fails,file=tests/example.js,line=9,col=11::[Error [ERR_TEST_FAILURE]: this is an error] {%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext.<anonymous> (CWD/tests/example.js:9:11)%0A at Test.runInAsyncScope (node:async_hooks:203: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:214:3),%0A code: 'ERR_TEST_FAILURE'%0A} | ||
::debug::starting to run is a diagnostic | ||
::debug::completed running is a diagnostic | ||
::notice file=tests/example.js,line=11,col=3::this is a diagnostic | ||
::debug::starting to run should fail | ||
::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 failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:%0A %0A assert(false)%0A %0A at TestContext.<anonymous> (CWD/tests/example.js:12:31)%0A at Test.runInAsyncScope (node:async_hooks:203: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 code: 'ERR_TEST_FAILURE'%0A} | ||
::debug::starting to run more tests | ||
::debug::starting to run is ok | ||
::debug::completed running is ok | ||
::debug::completed running more tests | ||
::debug::starting to run is skipped | ||
::debug::completed running is skipped | ||
::debug::starting to run is a todo | ||
::debug::completed running is a todo | ||
::debug::starting to run top level diagnostic | ||
::debug::completed running top level diagnostic | ||
::notice file=tests/example.js,line=21,col=1::top level diagnostic | ||
::group::Test results (4 passed, 2 failed) | ||
::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: *ms | ||
::endgroup:: | ||
", | ||
} |
1 change: 0 additions & 1 deletion
1
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/1.json
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Test Results</h1> | ||
<table><tr><td>Total Tests</td><td>8</td></tr><tr><td>Suites 📂</td><td>2</td></tr><tr><td>Passed ✅</td><td>4</td></tr><tr><td>Failed ❌</td><td>2</td></tr><tr><td>Canceled 🚫</td><td>0</td></tr><tr><td>Skipped ⏭️</td><td>1</td></tr><tr><td>Todo 📝</td><td>1</td></tr><tr><td>Duration 🕐</td><td>*ms</td></tr></table> |
5 changes: 0 additions & 5 deletions
5
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/2.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/github/.snapshots/4353502ed400317a687af8c8312f2662/2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Object { | ||
"exitCode": 1, | ||
"stderr": "", | ||
"stdout": "::debug::starting to run should fail | ||
::error title=should fail,file=tests/example.mjs,line=5,col=3::[Error [ERR_TEST_FAILURE]: false == true] {%0A failureType: 'testCodeFailure',%0A cause: AssertionError [ERR_ASSERTION]: false == true%0A at TestContext.<anonymous> (file://CWD/tests/example.mjs:5:3)%0A at Test.runInAsyncScope (node:async_hooks:203: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:214:17) {%0A generatedMessage: true,%0A code: 'ERR_ASSERTION',%0A actual: false,%0A expected: true,%0A operator: '=='%0A },%0A code: 'ERR_TEST_FAILURE'%0A} | ||
::debug::starting to run should pass | ||
::debug::completed running should pass | ||
::group::Test results (1 passed, 1 failed) | ||
::notice::Total Tests: 2%0ASuites 📂: 0%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration 🕐: *ms | ||
::endgroup:: | ||
", | ||
} |
Oops, something went wrong.