@reporters/github 1.1.3 → 1.2.0

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.0](https://github.com/MoLow/reporters/compare/github-v1.1.3...github-v1.2.0) (2023-05-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * report node 20 features ([c99a76c](https://github.com/MoLow/reporters/commit/c99a76c0f6bef75abb2c053c82c88448b0c82690))
9
+
3
10
  ## [1.1.3](https://github.com/MoLow/reporters/compare/github-v1.1.2...github-v1.1.3) (2023-04-03)
4
11
 
5
12
 
package/index.js CHANGED
@@ -20,12 +20,13 @@ const parseStack = (error, file) => {
20
20
 
21
21
  const DIAGNOSTIC_KEYS = {
22
22
  tests: 'Total Tests',
23
+ suites: 'Suites 📂',
23
24
  pass: 'Passed ✅',
24
25
  fail: 'Failed ❌',
25
26
  cancelled: 'Canceled 🚫',
26
27
  skipped: 'Skipped ⏭️',
27
28
  todo: 'Todo 📝',
28
- duration_ms: 'Duration',
29
+ duration_ms: 'Duration 🕐',
29
30
  };
30
31
 
31
32
  const DIAGNOSTIC_VALUES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporters/github",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "A github actions reporter for `node:test`",
5
5
  "keywords": [
6
6
  "github actions",
@@ -5,7 +5,8 @@ const assert = require('assert');
5
5
  const path = require('path');
6
6
  const { readFileSync, writeFileSync } = require('fs');
7
7
  const { compareLines } = require('../../../tests/utils');
8
- const output = require('./output');
8
+ // eslint-disable-next-line import/no-dynamic-require
9
+ const output = require(`./output.${process.version.split('.')[0]}`);
9
10
 
10
11
  const GITHUB_STEP_SUMMARY = join(tmpdir(), 'github-actions-test-reporter');
11
12
  writeFileSync(GITHUB_STEP_SUMMARY, '');
@@ -13,10 +13,10 @@ module.exports = {
13
13
  ::debug::completed running is ok
14
14
  ::debug::completed running more tests
15
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
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>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>
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
  };
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ stdout: `::debug::starting to run tests
3
+ ::debug::starting to run is ok
4
+ ::debug::completed running is ok
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 .*.<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
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' }
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: 4%0ASuites 📂: 2%0APassed ✅: 3%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration 🕐: .*ms
17
+ ::endgroup::
18
+ `,
19
+ summary: `<h1>Test Results</h1>
20
+ <table><tr><td>Total Tests</td><td>4</td></tr><tr><td>Suites 📂</td><td>2</td></tr><tr><td>Passed ✅</td><td>3</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
+ `,
22
+ };
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ stdout: `::debug::starting to run tests
3
+ ::debug::starting to run is ok
4
+ ::debug::completed running is ok
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 .*.<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
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' }
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: 4%0ASuites 📂: 2%0APassed ✅: 3%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration 🕐: .*ms
17
+ ::endgroup::
18
+ `,
19
+ summary: `<h1>Test Results</h1>
20
+ <table><tr><td>Total Tests</td><td>4</td></tr><tr><td>Suites 📂</td><td>2</td></tr><tr><td>Passed ✅</td><td>3</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
+ `,
22
+ };