@reporters/github 1.2.0 → 1.4.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 +14 -0
- package/README.md +0 -1
- package/package.json +1 -1
- package/tests/index.test.js +16 -9
- package/tests/output.v18.js +7 -3
- package/tests/output.v19.js +7 -3
- package/tests/output.v20.js +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0](https://github.com/MoLow/reporters/compare/github-v1.3.0...github-v1.4.0) (2023-07-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support node 18 ([02c8957](https://github.com/MoLow/reporters/commit/02c8957ffca3cb8376f7ad5a94f4627c70b7f8e5))
|
|
9
|
+
|
|
10
|
+
## [1.3.0](https://github.com/MoLow/reporters/compare/github-v1.2.0...github-v1.3.0) (2023-07-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* publish with provenance ([6ee1e46](https://github.com/MoLow/reporters/commit/6ee1e46040329edeb0f40f753093b6952984f001))
|
|
16
|
+
|
|
3
17
|
## [1.2.0](https://github.com/MoLow/reporters/compare/github-v1.1.3...github-v1.2.0) (2023-05-30)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
package/package.json
CHANGED
package/tests/index.test.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { test, describe } = require('node:test');
|
|
1
2
|
const { spawnSync } = require('child_process');
|
|
2
3
|
const { tmpdir } = require('os');
|
|
3
4
|
const { join } = require('path');
|
|
@@ -11,14 +12,20 @@ const output = require(`./output.${process.version.split('.')[0]}`);
|
|
|
11
12
|
const GITHUB_STEP_SUMMARY = join(tmpdir(), 'github-actions-test-reporter');
|
|
12
13
|
writeFileSync(GITHUB_STEP_SUMMARY, '');
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
15
|
+
describe('github reporter', () => {
|
|
16
|
+
const child = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example'], {
|
|
17
|
+
env: { GITHUB_ACTIONS: true, GITHUB_STEP_SUMMARY, GITHUB_WORKSPACE: path.resolve(__dirname, '../../../') },
|
|
18
|
+
});
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
compareLines(
|
|
20
|
+
test('spwan with reporter', () => {
|
|
21
|
+
assert.strictEqual(child.stderr?.toString(), '');
|
|
22
|
+
compareLines(child.stdout?.toString(), output.stdout);
|
|
23
|
+
compareLines(readFileSync(GITHUB_STEP_SUMMARY).toString(), output.summary);
|
|
24
|
+
});
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
assert.strictEqual(silentChild.
|
|
26
|
+
test('should noop if not in github actions', () => {
|
|
27
|
+
const silentChild = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example'], { env: { } });
|
|
28
|
+
assert.strictEqual(silentChild.stderr?.toString(), '');
|
|
29
|
+
assert.strictEqual(silentChild.stdout?.toString(), '');
|
|
30
|
+
});
|
|
31
|
+
});
|
package/tests/output.v18.js
CHANGED
|
@@ -12,11 +12,15 @@ module.exports = {
|
|
|
12
12
|
::debug::starting to run is ok
|
|
13
13
|
::debug::completed running is ok
|
|
14
14
|
::debug::completed running more tests
|
|
15
|
-
::
|
|
16
|
-
::
|
|
15
|
+
::debug::starting to run is skipped
|
|
16
|
+
::debug::completed running is skipped
|
|
17
|
+
::debug::starting to run is a todo
|
|
18
|
+
::debug::completed running is a todo
|
|
19
|
+
::group::Test results \\(6 passed, 2 failed\\)
|
|
20
|
+
::notice::Total Tests: 6%0ASuites 📂: 2%0APassed ✅: 3%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: .*ms
|
|
17
21
|
::endgroup::
|
|
18
22
|
`,
|
|
19
23
|
summary: `<h1>Test Results</h1>
|
|
20
|
-
<table><tr><td>Total Tests</td><td>2</td></tr><tr><td>Passed ✅</td><td>
|
|
24
|
+
<table><tr><td>Total Tests</td><td>6</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>1</td></tr><tr><td>Todo 📝</td><td>1</td></tr><tr><td>Duration 🕐</td><td>.*ms</td></tr></table>
|
|
21
25
|
`,
|
|
22
26
|
};
|
package/tests/output.v19.js
CHANGED
|
@@ -12,11 +12,15 @@ module.exports = {
|
|
|
12
12
|
::debug::starting to run is ok
|
|
13
13
|
::debug::completed running is ok
|
|
14
14
|
::debug::completed running more tests
|
|
15
|
-
::
|
|
16
|
-
::
|
|
15
|
+
::debug::starting to run is skipped
|
|
16
|
+
::debug::completed running is skipped
|
|
17
|
+
::debug::starting to run is a todo
|
|
18
|
+
::debug::completed running is a todo
|
|
19
|
+
::group::Test results \\(6 passed, 2 failed\\)
|
|
20
|
+
::notice::Total Tests: 6%0ASuites 📂: 2%0APassed ✅: 3%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: .*ms
|
|
17
21
|
::endgroup::
|
|
18
22
|
`,
|
|
19
23
|
summary: `<h1>Test Results</h1>
|
|
20
|
-
<table><tr><td>Total Tests</td><td>
|
|
24
|
+
<table><tr><td>Total Tests</td><td>6</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>1</td></tr><tr><td>Todo 📝</td><td>1</td></tr><tr><td>Duration 🕐</td><td>.*ms</td></tr></table>
|
|
21
25
|
`,
|
|
22
26
|
};
|
package/tests/output.v20.js
CHANGED
|
@@ -12,11 +12,15 @@ module.exports = {
|
|
|
12
12
|
::debug::starting to run is ok
|
|
13
13
|
::debug::completed running is ok
|
|
14
14
|
::debug::completed running more tests
|
|
15
|
-
::
|
|
16
|
-
::
|
|
15
|
+
::debug::starting to run is skipped
|
|
16
|
+
::debug::completed running is skipped
|
|
17
|
+
::debug::starting to run is a todo
|
|
18
|
+
::debug::completed running is a todo
|
|
19
|
+
::group::Test results \\(6 passed, 2 failed\\)
|
|
20
|
+
::notice::Total Tests: 6%0ASuites 📂: 2%0APassed ✅: 3%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: .*ms
|
|
17
21
|
::endgroup::
|
|
18
22
|
`,
|
|
19
23
|
summary: `<h1>Test Results</h1>
|
|
20
|
-
<table><tr><td>Total Tests</td><td>
|
|
24
|
+
<table><tr><td>Total Tests</td><td>6</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>1</td></tr><tr><td>Todo 📝</td><td>1</td></tr><tr><td>Duration 🕐</td><td>.*ms</td></tr></table>
|
|
21
25
|
`,
|
|
22
26
|
};
|