Skip to content

Commit

Permalink
CLI: Upgrade js-reporters to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Apr 4, 2021
1 parent f1f84d8 commit 75c40e8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"commander": "7.1.0",
"js-reporters": "1.2.3",
"js-reporters": "2.0.0",
"node-watch": "0.7.1",
"tiny-glob": "0.2.8"
},
Expand Down
71 changes: 39 additions & 32 deletions test/cli/fixtures/expected/tap-outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ ok 2 Second > 1
`TAP version 13
not ok 1 Throws match > bad
---
message: "match error"
message: match error
severity: failed
actual : "Error: Match me with a pattern"
actual : Error: Match me with a pattern
expected: "/incorrect pattern/"
stack: at Object.<anonymous> (/qunit/test/cli/fixtures/fail/throws-match.js:3:10)
stack: |
at Object.<anonymous> (/qunit/test/cli/fixtures/fail/throws-match.js:3:10)
...
1..1
# pass 0
Expand Down Expand Up @@ -113,27 +114,29 @@ Last test to run (hanging) has an async hold. Ensure all assert.async() callback
`TAP version 13
not ok 1 Unhandled Rejections > test passes just fine, but has a rejected promise
---
message: "Error thrown in non-returned promise!"
message: Error thrown in non-returned promise!
severity: failed
actual : {
"message": "Error thrown in non-returned promise!",
"stack": "Error: Error thrown in non-returned promise!\\n at /some/path/wherever/unhandled-rejection.js:13:11"
}
expected: undefined
stack: Error: Error thrown in non-returned promise!
at /some/path/wherever/unhandled-rejection.js:13:11
stack: |
Error: Error thrown in non-returned promise!
at /some/path/wherever/unhandled-rejection.js:13:11
...
not ok 2 global failure
---
message: "outside of a test context"
message: outside of a test context
severity: failed
actual : {
"message": "outside of a test context",
"stack": "Error: outside of a test context\\n at Object.<anonymous> (/some/path/wherever/unhandled-rejection.js:20:18)"
}
expected: undefined
stack: Error: outside of a test context
at Object.<anonymous> (/some/path/wherever/unhandled-rejection.js:20:18)
stack: |
Error: outside of a test context
at Object.<anonymous> (/some/path/wherever/unhandled-rejection.js:20:18)
...
1..2
# pass 0
Expand All @@ -146,16 +149,17 @@ not ok 2 global failure
`TAP version 13
not ok 1 global failure
---
message: "No tests were run."
message: No tests were run.
severity: failed
actual : {}
expected: undefined
stack: Error: No tests were run.
at done (/qunit/qunit/qunit.js)
at advanceTestQueue (/qunit/qunit/qunit.js)
at Object.advance (/qunit/qunit/qunit.js)
at unblockAndAdvanceQueue (/qunit/qunit/qunit.js)
at internal
stack: |
Error: No tests were run.
at done (/qunit/qunit/qunit.js)
at advanceTestQueue (/qunit/qunit/qunit.js)
at Object.advance (/qunit/qunit/qunit.js)
at unblockAndAdvanceQueue (/qunit/qunit/qunit.js)
at internal
...
1..1
# pass 0
Expand All @@ -168,7 +172,7 @@ not ok 1 global failure
ok 1 Example > good
not ok 2 Example > bad
---
message: "failed"
message: failed
severity: failed
actual : false
expected: true
Expand All @@ -185,7 +189,7 @@ not ok 2 Example > bad
ok 1 Example > good
not ok 2 Example > bad
---
message: "failed"
message: failed
severity: failed
actual : false
expected: true
Expand All @@ -210,11 +214,12 @@ ok 1 ESM test suite > sum()
`TAP version 13
not ok 1 timeout > first
---
message: "Test took longer than 10ms; test timed out."
message: Test took longer than 10ms; test timed out.
severity: failed
actual : null
expected: undefined
stack: at internal
stack: |
at internal
...
ok 2 timeout > second
1..2
Expand All @@ -232,21 +237,21 @@ ok 1 Zero assertions > has a test
# todo 0
# fail 0`,

// Ignore the last frame about Node processing ticks (differs between Node 10 ad 12+)
"qunit qunit --filter 'no matches' test":
`TAP version 13
not ok 1 global failure
---
message: "No tests matched the filter "no matches"."
message: "No tests matched the filter \\"no matches\\"."
severity: failed
actual : {}
expected: undefined
stack: Error: No tests matched the filter "no matches".
at done (/qunit/qunit/qunit.js)
at advanceTestQueue (/qunit/qunit/qunit.js)
at Object.advance (/qunit/qunit/qunit.js)
at unblockAndAdvanceQueue (/qunit/qunit/qunit.js)
at internal
stack: |
Error: No tests matched the filter "no matches".
at done (/qunit/qunit/qunit.js)
at advanceTestQueue (/qunit/qunit/qunit.js)
at Object.advance (/qunit/qunit/qunit.js)
at unblockAndAdvanceQueue (/qunit/qunit/qunit.js)
at internal
...
1..1
# pass 0
Expand Down Expand Up @@ -289,11 +294,12 @@ ok 2 all tests with only run
`TAP version 13
not ok 1 # TODO module B > Only this module should run > a todo test
---
message: "not implemented yet"
message: not implemented yet
severity: todo
actual : false
expected: true
stack: at Object.<anonymous> (/qunit/test/cli/fixtures/only/module.js:17:15)
stack: |
at Object.<anonymous> (/qunit/test/cli/fixtures/only/module.js:17:15)
...
ok 2 # SKIP module B > Only this module should run > implicitly skipped test
ok 3 module B > Only this module should run > normal test
Expand All @@ -310,11 +316,12 @@ ok 6 module E > test E
`TAP version 13
not ok 1 # TODO module B > test B
---
message: "not implemented yet"
message: not implemented yet
severity: todo
actual : false
expected: true
stack: at Object.<anonymous> (/qunit/test/cli/fixtures/only/module-flat.js:9:13)
stack: |
at Object.<anonymous> (/qunit/test/cli/fixtures/only/module-flat.js:9:13)
...
ok 2 # SKIP module B > test C
ok 3 module B > test D
Expand Down

0 comments on commit 75c40e8

Please sign in to comment.