Skip to content

Commit 05fb1f6

Browse files
authored
Add jest rootDir and test-frontend dependency (go-gitea#15860)
- Define jest rootDir to limit where it looks for test files - Add missing dependency on test-frontend target so it can be ran from a clean checkout
1 parent 44286e2 commit 05fb1f6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ test-backend:
359359
@$(GO) test $(GOTESTFLAGS) -mod=vendor -tags='$(TEST_TAGS)' $(GO_PACKAGES)
360360

361361
.PHONY: test-frontend
362-
test-frontend:
362+
test-frontend: node_modules
363363
@NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
364364

365365
.PHONY: test-check

jest.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
export default {
22
setupFilesAfterEnv: ['jest-extended'],
33
testTimeout: 20000,
4+
rootDir: 'web_src',
45
testMatch: [
5-
'**/web_src/**/*.test.js',
6+
'<rootDir>/**/*.test.js',
67
],
78
transform: {},
89
verbose: false,

0 commit comments

Comments
 (0)