@reporters/github 1.13.0 → 1.13.1

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 +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -82,9 +82,9 @@ function transformEvent(event) {
82
82
  return new Command('debug', {}, `completed running ${event.data.name}`).toString();
83
83
  case 'test:fail': {
84
84
  const error = event.data.details?.error;
85
- if (error?.code === 'ERR_TEST_FAILURE' && error?.failureType === 'subtestsFailed') {
86
- // This means the failed subtests are already reported
87
- // no need to re-annotate the file itself
85
+ if (!error || (error.code === 'ERR_TEST_FAILURE' && error.failureType === 'subtestsFailed')) {
86
+ // Either no error object on the event, or failed subtests are already
87
+ // reported — no need to re-annotate the file itself.
88
88
  break;
89
89
  }
90
90
  const err = error.code === 'ERR_TEST_FAILURE' ? error.cause : error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporters/github",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "A github actions reporter for `node:test`",
5
5
  "type": "commonjs",
6
6
  "keywords": [