| 
									
										
										
										
											2020-10-20 23:41:47 +08:00
										 |  |  | // We set this specifically for 2 reasons.
 | 
					
						
							|  |  |  | // 1. It makes sense for both CI tests and local tests to behave the same so issues are found earlier
 | 
					
						
							|  |  |  | // 2. Any wrong timezone handling could be hidden if we use UTC/GMT local time (which would happen in CI).
 | 
					
						
							|  |  |  | process.env.TZ = 'Pacific/Easter'; | 
					
						
							| 
									
										
										
										
											2020-09-17 14:59:20 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-22 13:03:26 +08:00
										 |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2017-11-17 23:18:30 +08:00
										 |  |  |   verbose: false, | 
					
						
							| 
									
										
										
										
											2020-02-14 04:37:24 +08:00
										 |  |  |   transform: { | 
					
						
							| 
									
										
										
										
											2020-04-02 19:34:16 +08:00
										 |  |  |     '^.+\\.(ts|tsx|js|jsx)$': 'ts-jest', | 
					
						
							| 
									
										
										
										
											2017-10-22 13:03:26 +08:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2020-02-14 04:37:24 +08:00
										 |  |  |   moduleDirectories: ['node_modules', 'public'], | 
					
						
							|  |  |  |   roots: ['<rootDir>/public/app', '<rootDir>/public/test', '<rootDir>/packages', '<rootDir>/scripts'], | 
					
						
							|  |  |  |   testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$', | 
					
						
							|  |  |  |   moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], | 
					
						
							|  |  |  |   setupFiles: ['jest-canvas-mock', './public/test/jest-shim.ts', './public/test/jest-setup.ts'], | 
					
						
							| 
									
										
										
										
											2020-08-20 21:21:42 +08:00
										 |  |  |   setupFilesAfterEnv: ['./public/test/setupTests.ts'], | 
					
						
							| 
									
										
										
										
											2020-02-14 04:37:24 +08:00
										 |  |  |   snapshotSerializers: ['enzyme-to-json/serializer'], | 
					
						
							| 
									
										
										
										
											2021-04-23 15:06:19 +08:00
										 |  |  |   globals: { | 
					
						
							|  |  |  |     'ts-jest': { isolatedModules: true }, | 
					
						
							|  |  |  |     __webpack_public_path__: '', // empty string
 | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2020-05-04 21:05:31 +08:00
										 |  |  |   moduleNameMapper: { | 
					
						
							|  |  |  |     '\\.svg': '<rootDir>/public/test/mocks/svg.ts', | 
					
						
							| 
									
										
										
										
											2020-06-30 01:58:47 +08:00
										 |  |  |     '\\.css': '<rootDir>/public/test/mocks/style.ts', | 
					
						
							| 
									
										
										
										
											2020-09-03 14:54:46 +08:00
										 |  |  |     'monaco-editor/esm/vs/editor/editor.api': '<rootDir>/public/test/mocks/monaco.ts', | 
					
						
							| 
									
										
										
										
											2020-11-24 17:38:41 +08:00
										 |  |  |     '^react($|/.+)': '<rootDir>/node_modules/react$1', | 
					
						
							| 
									
										
										
										
											2020-05-04 21:05:31 +08:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2020-09-03 14:54:46 +08:00
										 |  |  |   watchPathIgnorePatterns: ['<rootDir>/node_modules/'], | 
					
						
							| 
									
										
										
										
											2017-10-22 13:03:26 +08:00
										 |  |  | }; |