Skip to content

Commit a1a2c20

Browse files
authored
fix(transformer): correct url in error message (#13483)
1 parent 571c940 commit a1a2c20

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Chore & Maintenance
1010

11+
- `[docs]` Update link to Jest 28 upgrade guide in error message ([#13483](https://github.com/facebook/jest/pull/13483))
12+
1113
### Performance
1214

1315
## 29.2.1

packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ exports[`ScriptTransformer throws an error if \`process\` doesn't return an obje
360360
<red> should return an object or a Promise resolving to an object. The object </color>
361361
<red> must have \`code\` property with a string of processed code.</color>
362362
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
363-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
363+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
364364
<red> <bold>Code Transformation Documentation:</intensity></color>
365365
<red> https://jestjs.io/docs/code-transformation</color>
366366
<red></color>"
@@ -373,7 +373,7 @@ exports[`ScriptTransformer throws an error if \`process\` doesn't return an obje
373373
<red> should return an object or a Promise resolving to an object. The object </color>
374374
<red> must have \`code\` property with a string of processed code.</color>
375375
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
376-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
376+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
377377
<red> <bold>Code Transformation Documentation:</intensity></color>
378378
<red> https://jestjs.io/docs/code-transformation</color>
379379
<red></color>"
@@ -386,7 +386,7 @@ exports[`ScriptTransformer throws an error if \`process\` doesn't return an obje
386386
<red> should return an object or a Promise resolving to an object. The object </color>
387387
<red> must have \`code\` property with a string of processed code.</color>
388388
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
389-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
389+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
390390
<red> <bold>Code Transformation Documentation:</intensity></color>
391391
<red> https://jestjs.io/docs/code-transformation</color>
392392
<red></color>"
@@ -399,7 +399,7 @@ exports[`ScriptTransformer throws an error if \`process\` doesn't return an obje
399399
<red> should return an object or a Promise resolving to an object. The object </color>
400400
<red> must have \`code\` property with a string of processed code.</color>
401401
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
402-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
402+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
403403
<red> <bold>Code Transformation Documentation:</intensity></color>
404404
<red> https://jestjs.io/docs/code-transformation</color>
405405
<red></color>"
@@ -412,7 +412,7 @@ exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a
412412
<red> should return an object or a Promise resolving to an object. The object </color>
413413
<red> must have \`code\` property with a string of processed code.</color>
414414
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
415-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
415+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
416416
<red> <bold>Code Transformation Documentation:</intensity></color>
417417
<red> https://jestjs.io/docs/code-transformation</color>
418418
<red></color>"
@@ -425,7 +425,7 @@ exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a
425425
<red> should return an object or a Promise resolving to an object. The object </color>
426426
<red> must have \`code\` property with a string of processed code.</color>
427427
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
428-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
428+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
429429
<red> <bold>Code Transformation Documentation:</intensity></color>
430430
<red> https://jestjs.io/docs/code-transformation</color>
431431
<red></color>"
@@ -438,7 +438,7 @@ exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a
438438
<red> should return an object or a Promise resolving to an object. The object </color>
439439
<red> must have \`code\` property with a string of processed code.</color>
440440
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
441-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
441+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
442442
<red> <bold>Code Transformation Documentation:</intensity></color>
443443
<red> https://jestjs.io/docs/code-transformation</color>
444444
<red></color>"
@@ -451,7 +451,7 @@ exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a
451451
<red> should return an object or a Promise resolving to an object. The object </color>
452452
<red> must have \`code\` property with a string of processed code.</color>
453453
<red> <bold>This error may be caused by a breaking change in Jest 28:</intensity></color>
454-
<red> https://jestjs.io/docs/upgrading-to-jest28#transformer</color>
454+
<red> https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer</color>
455455
<red> <bold>Code Transformation Documentation:</intensity></color>
456456
<red> https://jestjs.io/docs/code-transformation</color>
457457
<red></color>"

packages/jest-transform/src/runtimeErrorsAndWarnings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const DOCUMENTATION_NOTE = ` ${chalk.bold(
1717
const UPGRADE_NOTE = ` ${chalk.bold(
1818
'This error may be caused by a breaking change in Jest 28:',
1919
)}
20-
https://jestjs.io/docs/upgrading-to-jest28#transformer
20+
https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer
2121
`;
2222

2323
export const makeInvalidReturnValueError = (transformPath: string): string =>

0 commit comments

Comments
 (0)