|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
| 3 | +exports[`config init should create a jest config file with cli options for config type default 1`] = ` |
| 4 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 5 | +module.exports = { |
| 6 | + testEnvironment: "node", |
| 7 | + transform: { |
| 8 | + "^.+.tsx?$": ["ts-jest",{}], |
| 9 | + }, |
| 10 | +};" |
| 11 | +`; |
| 12 | + |
| 13 | +exports[`config init should create a jest config file with cli options for config type default and type "module" package.json 1`] = ` |
| 14 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 15 | +export default { |
| 16 | + testEnvironment: "node", |
| 17 | + transform: { |
| 18 | + "^.+.tsx?$": ["ts-jest",{}], |
| 19 | + }, |
| 20 | +};" |
| 21 | +`; |
| 22 | + |
| 23 | +exports[`config init should create a jest config file with cli options for config type js-with-babel-full-options 1`] = ` |
| 24 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 25 | +module.exports = { |
| 26 | + testEnvironment: "jsdom", |
| 27 | + transform: { |
| 28 | + "^.+.jsx?$": ["babel-jest",{}], |
| 29 | + }, |
| 30 | +};" |
| 31 | +`; |
| 32 | + |
| 33 | +exports[`config init should create a jest config file with cli options for config type js-with-babel-full-options and type "module" package.json 1`] = ` |
| 34 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 35 | +export default { |
| 36 | + testEnvironment: "jsdom", |
| 37 | + transform: { |
| 38 | + "^.+.jsx?$": ["babel-jest",{}], |
| 39 | + }, |
| 40 | +};" |
| 41 | +`; |
| 42 | + |
| 43 | +exports[`config init should create a jest config file with cli options for config type js-with-ts-full-options 1`] = ` |
| 44 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 45 | +module.exports = { |
| 46 | + testEnvironment: "jsdom", |
| 47 | + transform: { |
| 48 | + "^.+.[tj]sx?$": ["ts-jest",{tsconfig:"tsconfig.test.json"}], |
| 49 | + }, |
| 50 | +};" |
| 51 | +`; |
| 52 | + |
| 53 | +exports[`config init should create a jest config file with cli options for config type js-with-ts-full-options and type "module" package.json 1`] = ` |
| 54 | +"/** @type {import('ts-jest').JestConfigWithTsJest} **/ |
| 55 | +export default { |
| 56 | + testEnvironment: "jsdom", |
| 57 | + transform: { |
| 58 | + "^.+.[tj]sx?$": ["ts-jest",{tsconfig:"tsconfig.test.json"}], |
| 59 | + }, |
| 60 | +};" |
| 61 | +`; |
| 62 | + |
| 63 | +exports[`config init should update package.json for config type default when user defines jest config via package.json 1`] = ` |
| 64 | +"{ |
| 65 | + "name": "mock", |
| 66 | + "version": "0.0.0-mock.0", |
| 67 | + "jest": { |
| 68 | + "transform": { |
| 69 | + "^.+.tsx?$": [ |
| 70 | + "ts-jest", |
| 71 | + {} |
| 72 | + ] |
| 73 | + } |
| 74 | + } |
| 75 | +}" |
| 76 | +`; |
| 77 | + |
| 78 | +exports[`config init should update package.json for config type js-with-babel-full-options when user defines jest config via package.json 1`] = ` |
| 79 | +"{ |
| 80 | + "name": "mock", |
| 81 | + "version": "0.0.0-mock.0", |
| 82 | + "jest": { |
| 83 | + "transform": { |
| 84 | + "^.+.jsx?$": [ |
| 85 | + "babel-jest", |
| 86 | + {} |
| 87 | + ], |
| 88 | + "^.+.tsx?$": [ |
| 89 | + "ts-jest", |
| 90 | + { |
| 91 | + "tsconfig": "tsconfig.test.json", |
| 92 | + "babelConfig": true |
| 93 | + } |
| 94 | + ] |
| 95 | + } |
| 96 | + } |
| 97 | +}" |
| 98 | +`; |
| 99 | + |
| 100 | +exports[`config init should update package.json for config type js-with-ts-full-options when user defines jest config via package.json 1`] = ` |
| 101 | +"{ |
| 102 | + "name": "mock", |
| 103 | + "version": "0.0.0-mock.0", |
| 104 | + "jest": { |
| 105 | + "transform": { |
| 106 | + "^.+.[tj]sx?$": [ |
| 107 | + "ts-jest", |
| 108 | + { |
| 109 | + "tsconfig": "tsconfig.test.json" |
| 110 | + } |
| 111 | + ] |
| 112 | + } |
| 113 | + } |
| 114 | +}" |
| 115 | +`; |
| 116 | + |
3 | 117 | exports[`config migrate should migrate globals ts-jest config to transformer config 1`] = `
|
4 | 118 | ""jest": {
|
5 | 119 | "transform": {
|
|
0 commit comments