mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add jest rootDir and test-frontend dependency (#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
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@@ -359,7 +359,7 @@ test-backend:
 | 
			
		||||
	@$(GO) test $(GOTESTFLAGS) -mod=vendor -tags='$(TEST_TAGS)' $(GO_PACKAGES)
 | 
			
		||||
 | 
			
		||||
.PHONY: test-frontend
 | 
			
		||||
test-frontend:
 | 
			
		||||
test-frontend: node_modules
 | 
			
		||||
	@NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
 | 
			
		||||
 | 
			
		||||
.PHONY: test-check
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
export default {
 | 
			
		||||
  setupFilesAfterEnv: ['jest-extended'],
 | 
			
		||||
  testTimeout: 20000,
 | 
			
		||||
  rootDir: 'web_src',
 | 
			
		||||
  testMatch: [
 | 
			
		||||
    '**/web_src/**/*.test.js',
 | 
			
		||||
    '<rootDir>/**/*.test.js',
 | 
			
		||||
  ],
 | 
			
		||||
  transform: {},
 | 
			
		||||
  verbose: false,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user