Skip to content

Commit 98f1fc3

Browse files
Luke BowermanLuke Bowerman
authored andcommitted
Switch to using babel-jest instead of ts-jest
Switch to using dynmamic paths for tsconfig & Jest package resolution Rename test-utils and provide folders to match package names to allow for dynamic resolution
1 parent bf08693 commit 98f1fc3

File tree

20 files changed

+38
-68
lines changed

20 files changed

+38
-68
lines changed

jest.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ module.exports = {
3030
moduleDirectories: ['./node_modules', './packages'],
3131
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
3232
moduleNameMapper: {
33+
'@looker/(.+)$': '<rootDir>/packages/$1/src',
3334
'\\.(css)$': '<rootDir>/config/jest/styleMock.js',
3435
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
3536
'<rootDir>/config/jest/fileMock.js',
3637
},
3738
setupFilesAfterEnv: ['./jest.setup.js'],
3839
testMatch: ['**/?(*.)(spec|test).(ts|js)?(x)'],
39-
transform: {
40-
'^.+\\.(js|jsx|ts|tsx)$': 'ts-jest',
41-
},
4240
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"react": "^16.13.1",
7979
"react-dom": "^16.13.1",
8080
"styled-components": "^4.4.1",
81-
"ts-jest": "^25.5.1",
8281
"typescript": "^3.8.3",
8382
"webpack": "^4.43.0"
8483
},

packages/providers/package.json renamed to packages/components-providers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repository": {
1111
"type": "git",
1212
"url": "https://github.com/looker-open-source/components",
13-
"directory": "packages/providers"
13+
"directory": "packages/components-providers"
1414
},
1515
"publishConfig": {
1616
"access": "public"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/test-utils/package.json renamed to packages/components-test-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repository": {
1111
"type": "git",
1212
"url": "https://github.com/looker-open-source/components",
13-
"directory": "packages/test-utils"
13+
"directory": "packages/components-test-utils"
1414
},
1515
"publishConfig": {
1616
"access": "public"

0 commit comments

Comments
 (0)