@reporters/github 1.12.0 → 1.13.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.
Files changed (2) hide show
  1. package/index.js +21 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -100,6 +100,27 @@ function transformEvent(event) {
100
100
  return new Command('notice', toCommandProperties(extractLocation(event.data)), `${event.data.message}`).toString();
101
101
  }
102
102
  break;
103
+ /* c8 ignore start */
104
+ case 'test:interrupted': {
105
+ const { tests } = event.data;
106
+ let res = '';
107
+ for (let i = 0; i < tests.length; i += 1) {
108
+ const test = tests[i];
109
+ const file = test.file ? getFilePath(test.file) : undefined;
110
+ let msg = `Interrupted while running: ${test.name}`;
111
+ if (file) {
112
+ msg += ` at ${file}:${test.line}:${test.column}`;
113
+ }
114
+ res += new Command('warning', toCommandProperties({
115
+ file,
116
+ startLine: test.line,
117
+ startColumn: test.column,
118
+ title: `Interrupted: ${test.name}`,
119
+ }), msg).toString();
120
+ }
121
+ return res;
122
+ }
123
+ /* c8 ignore stop */
103
124
  default:
104
125
  break;
105
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporters/github",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "A github actions reporter for `node:test`",
5
5
  "type": "commonjs",
6
6
  "keywords": [