@reporters/github 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/index.js +2 -1
- package/package.json +1 -1
- package/tests/index.test.js +4 -0
- package/tests/output.js +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.3](https://github.com/MoLow/reporters/compare/github-v1.1.2...github-v1.1.3) (2023-04-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* allow multiple roots ([590df94](https://github.com/MoLow/reporters/commit/590df948f8a4626fc29e8ce185e08d2226a307ba))
|
|
9
|
+
|
|
10
|
+
## [1.1.2](https://github.com/MoLow/reporters/compare/github-v1.1.1...github-v1.1.2) (2023-02-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **github:** remove redundant diagnostics ([b62df32](https://github.com/MoLow/reporters/commit/b62df3280b141af763386a68b0b4e386bef907e7))
|
|
16
|
+
|
|
3
17
|
## [1.1.1](https://github.com/MoLow/reporters/compare/github-v1.1.0...github-v1.1.1) (2023-02-28)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/@reporters/github) 
|
|
1
|
+
[](https://www.npmjs.com/package/@reporters/github)  [](https://codecov.io/gh/MoLow/reporters)
|
|
2
2
|
|
|
3
3
|
# Github Actions Reporter
|
|
4
4
|
A Github actions reporter for `node:test`
|
package/index.js
CHANGED
|
@@ -64,9 +64,10 @@ module.exports = async function githubReporter(source) {
|
|
|
64
64
|
counter.fail += 1;
|
|
65
65
|
break;
|
|
66
66
|
} case 'test:diagnostic':
|
|
67
|
-
core.notice(event.data.message, { file: getFilePath(event.data.file) });
|
|
68
67
|
if (event.data.nesting === 0) {
|
|
69
68
|
diagnostics.push(event.data.message);
|
|
69
|
+
} else {
|
|
70
|
+
core.notice(event.data.message, { file: getFilePath(event.data.file) });
|
|
70
71
|
}
|
|
71
72
|
break;
|
|
72
73
|
default:
|
package/package.json
CHANGED
package/tests/index.test.js
CHANGED
|
@@ -17,3 +17,7 @@ const child = spawnSync(process.execPath, ['--test-reporter', './index.js', '../
|
|
|
17
17
|
assert.strictEqual(child.stderr?.toString(), '');
|
|
18
18
|
compareLines(child.stdout?.toString(), output.stdout);
|
|
19
19
|
compareLines(readFileSync(GITHUB_STEP_SUMMARY).toString(), output.summary);
|
|
20
|
+
|
|
21
|
+
const silentChild = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example'], { env: { } });
|
|
22
|
+
assert.strictEqual(silentChild.stderr?.toString(), '');
|
|
23
|
+
assert.strictEqual(silentChild.stdout?.toString(), '');
|
package/tests/output.js
CHANGED
|
@@ -3,20 +3,20 @@ module.exports = {
|
|
|
3
3
|
::debug::starting to run is ok
|
|
4
4
|
::debug::completed running is ok
|
|
5
5
|
::debug::starting to run fails
|
|
6
|
-
::error title=fails,file=tests/example.js::\\[Error \\[ERR_TEST_FAILURE\\]: this is an error\\] {%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at
|
|
6
|
+
::error title=fails,file=tests/example.js::\\[Error \\[ERR_TEST_FAILURE\\]: this is an error\\] {%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at .*.<anonymous> (.*/example.js:6:11).*
|
|
7
|
+
::debug::starting to run is a diagnostic
|
|
8
|
+
::debug::completed running is a diagnostic
|
|
9
|
+
::notice file=tests/example.js::this is a diagnostic
|
|
7
10
|
::error title=tests,file=tests/example.js::\\[Error \\[ERR_TEST_FAILURE\\]: 1 subtest failed\\] { failureType: 'subtestsFailed', cause: '1 subtest failed', code: 'ERR_TEST_FAILURE' }
|
|
8
|
-
::
|
|
9
|
-
::
|
|
10
|
-
::
|
|
11
|
-
::
|
|
12
|
-
::
|
|
13
|
-
::notice
|
|
14
|
-
::notice file=tests/example.js::duration_ms .*
|
|
15
|
-
::group::Test results \\(1 passed, 2 failed\\)
|
|
16
|
-
::notice::Total Tests: 1%0APassed ✅: 0%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration: .*ms
|
|
11
|
+
::debug::starting to run more tests
|
|
12
|
+
::debug::starting to run is ok
|
|
13
|
+
::debug::completed running is ok
|
|
14
|
+
::debug::completed running more tests
|
|
15
|
+
::group::Test results \\(4 passed, 2 failed\\)
|
|
16
|
+
::notice::Total Tests: 2%0APassed ✅: 1%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration: .*ms
|
|
17
17
|
::endgroup::
|
|
18
18
|
`,
|
|
19
19
|
summary: `<h1>Test Results</h1>
|
|
20
|
-
<table><tr><td>Total Tests</td><td>
|
|
20
|
+
<table><tr><td>Total Tests</td><td>2</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>
|
|
21
21
|
`,
|
|
22
22
|
};
|