@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 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
- [![npm version](https://img.shields.io/npm/v/@reporters/github)](https://www.npmjs.com/package/@reporters/github) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main)
1
+ [![npm version](https://img.shields.io/npm/v/@reporters/github)](https://www.npmjs.com/package/@reporters/github) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporters/github",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "A github actions reporter for `node:test`",
5
5
  "keywords": [
6
6
  "github actions",
@@ -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 Object.<anonymous> (.*/example.js:6:11).*
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
- ::notice file=tests/example.js::tests 1
9
- ::notice file=tests/example.js::pass 0
10
- ::notice file=tests/example.js::fail 1
11
- ::notice file=tests/example.js::cancelled 0
12
- ::notice file=tests/example.js::skipped 0
13
- ::notice file=tests/example.js::todo 0
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>1</td></tr><tr><td>Passed ✅</td><td>0</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>
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
  };