Skip to content

Commit

Permalink
chore: upgrade jest testing environment
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-hulski committed Jul 9, 2023
1 parent 2c05187 commit f333e7f
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 51 deletions.
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@
"@babel/preset-env": "7.22.5",
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.22.5",
"@testing-library/jest-dom": "5.3.0",
"@testing-library/svelte": "3.0.0",
"@types/jest": "25.2.3",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/svelte": "3.2.2",
"@types/jest": "29.5.2",
"@types/node": "20.3.1",
"@types/phoenix": "1.4.4",
"@types/react": "16.7.13",
"@types/react-dom": "16.0.6",
"@types/testing-library__jest-dom": "5.14.6",
"@types/vscode": "1.79.1",
"@types/ws": "7.4.7",
"@typescript-eslint/eslint-plugin": "5.59.11",
Expand All @@ -81,15 +82,16 @@
"eslint-plugin-standard": "4.0.1",
"html-webpack-plugin": "5.5.3",
"husky": "0.14.3",
"jest": "24.9.0",
"jest": "29.6.1",
"jest-environment-jsdom": "29.6.1",
"lint-staged": "11.0.0",
"prettier": "1.15.2",
"react-test-renderer": "16.9.0",
"repo-cooker": "8.0.6",
"rimraf": "2.6.2",
"svelte-jester": "1.1.5",
"svelte-jester": "2.3.2",
"terser-webpack-plugin": "5.3.9",
"ts-jest": "24.2.0",
"ts-jest": "29.1.1",
"ts-loader": "4.4.2",
"typescript": "4.3.4",
"url-loader": "4.1.1",
Expand Down
4 changes: 0 additions & 4 deletions packages/betsy/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['betsy'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind-devtools-client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-devtools-client'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind-devtools/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-devtools'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind-graphql/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-vue'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind-react/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-react'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind-statechart/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-statechart'],
},
}
5 changes: 1 addition & 4 deletions packages/overmind-svelte/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{t,j}s?(x)', '!src/**/*.d.ts'],
moduleFileExtensions: ['ts', 'js', 'svelte'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.svelte$': 'svelte-jester',
Expand All @@ -15,8 +16,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-svelte'],
},
}
6 changes: 3 additions & 3 deletions packages/overmind-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"svelte": "^3.49.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.3.0",
"@testing-library/svelte": "^3.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^3.2.2",
"@types/node": "^20.3.1",
"svelte-jester": "^1.1.5",
"svelte-jester": "^2.3.2",
"tslib": "^2.3.0"
},
"setupFilesAfterEnv": [
Expand Down
4 changes: 0 additions & 4 deletions packages/overmind-vue/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind-vue'],
},
}
4 changes: 0 additions & 4 deletions packages/overmind/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['overmind'],
},
}
3 changes: 1 addition & 2 deletions packages/overmind/src/mock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('Mock', () => {
},
])
})
test('should preserve getters', async (done) => {
test('should preserve getters', async () => {
expect.assertions(1)
const state = {
value: 0,
Expand All @@ -109,7 +109,6 @@ describe('Mock', () => {
const mock = createOvermindMock(config)
await mock.actions.updateValue()
expect(mock.state.valuePlusTwo).toEqual(17)
done()
})
test('should allow setting initial state', async () => {
expect.assertions(1)
Expand Down
4 changes: 0 additions & 4 deletions packages/proxy-state-tree/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ module.exports = {
],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
haste: {
// This option is needed or else globbing ignores <rootDir>/node_modules.
providesModuleNodeModules: ['proxy-state-tree'],
},
}

0 comments on commit f333e7f

Please sign in to comment.