Skip to content

Commit

Permalink
fix: tests fail if you run npm build instead of npm start before testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kriscoleman committed Jun 15, 2023
1 parent 9b334c9 commit 9bb7934
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Judge is a SaaS (Software as a Service) which aims to provide our open source software in a ready-to-use state, so that anyone with an interest in using it for supply-chain security can spin up our solutions quickly, easily, and effectively.",
"main": "index.js",
"scripts": {
"version": "./scripts/update-platform-version.sh",
"version:perms": "chmod +x ./scripts/update-platform-version.sh",
"build": "npm run build:web",
"build:web": "npm run build -w web",
"changelog": "npx git-conventional-commits changelog",
"pre-commit": "npm run pre-commit -w web",
"pre-push": "npx prepush-if-changed",
Expand Down Expand Up @@ -33,14 +33,15 @@
"test:judge-api": "cd judge-api && go test ./... && cd ..",
"test:web": "npm test -w web",
"test:witness": "cd subtrees/witness && go test ./... && cd ../..",
"test": "npm run test:go && npm test -w web"
"test": "npm run test:go && npm test -w web",
"version:perms": "chmod +x ./scripts/update-platform-version.sh",
"version": "./scripts/update-platform-version.sh"
},
"devDependencies": {
"@commitlint/cli": "^17.6.5",
"@commitlint/config-conventional": "^17.6.5",
"git-conventional-commits": "^2.6.5",
"husky": "8.0.3",
"jest-fetch-mock": "^3.0.3",
"prepush-if-changed": "^1.0.8"
},
"workspaces": [
Expand Down
9 changes: 4 additions & 5 deletions web/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,9 @@ export default {
// transform: undefined,

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$"
// ],
transformIgnorePatterns: ['node_modules/(?!(gatsby|gatsby-script)/)'],

modulePathIgnorePatterns: ['.cache'],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
Expand All @@ -221,7 +220,7 @@ export default {
// verbose: undefined,

// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
watchPathIgnorePatterns: ['/public/', '.stories.@(js|jsx|ts|tsx)', '.old/', '\\.gql\\.json$', 'generators'],
watchPathIgnorePatterns: ['.cache/', '/public/', '.stories.@(js|jsx|ts|tsx)', '.old/', '\\.gql\\.json$', 'generators'],

// Whether to use watchman for file crawling
// watchman: true,
Expand Down

0 comments on commit 9bb7934

Please sign in to comment.