Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): Add jest config back to rwjs/core #4461

Merged
merged 7 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/core/config/__tests__/webpack.common.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { getEnvVars } from '../webpack.common'
// @NOTE
// No babel in the package, so use standard node syntax

const { getEnvVars } = require('../webpack.common')

jest.mock('@redwoodjs/internal', () => {
return {
Expand Down
5 changes: 5 additions & 0 deletions packages/core/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/*.test.[jt]s?(x)'],
testPathIgnorePatterns: ['fixtures', 'dist'],
testTimeout: 15000,
}
7 changes: 5 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"scripts": {
"build": "yarn build:js",
"build:js": "babel src -d dist --extensions \".js,.ts,.tsx\"",
"prepublishOnly": "NODE_ENV=production yarn build"
"prepublishOnly": "NODE_ENV=production yarn build",
"test": "jest",
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/cli": "7.16.7",
Expand Down Expand Up @@ -87,7 +89,8 @@
"webpack-retry-chunk-load-plugin": "3.0.0"
},
"devDependencies": {
"@types/rimraf": "3.0.2"
"@types/rimraf": "3.0.2",
"jest": "27.5.1"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6097,6 +6097,7 @@ __metadata:
graphql: 16.4.0
graphql-tag: 2.12.6
html-webpack-plugin: 5.5.0
jest: 27.5.1
lodash.escaperegexp: 4.1.2
mini-css-extract-plugin: 2.6.0
nodemon: 2.0.16
Expand Down