Working tests in ESM mode.
Summary: scss Reviewers: #reviewers, kuba-orlik Reviewed By: #reviewers, kuba-orlik Subscribers: jenkins-user Differential Revision: https://hub.sealcode.org/D1358master
							parent
							
								
									46e70efcb3
								
							
						
					
					
						commit
						f7538a362d
					
				| @ -0,0 +1,2 @@ | |||||||
|  | mkdir -p docker_node_modules | ||||||
|  | docker-compose up -d | ||||||
| @ -1,9 +0,0 @@ | |||||||
| import { LONG_TEST_TIMEOUT } from "./src/back/test_utils/webhint"; |  | ||||||
| import { closeBrowser } from "./src/back/test_utils/browser-creator"; |  | ||||||
| 
 |  | ||||||
| exports.mochaHooks = { |  | ||||||
| 	async afterAll() { |  | ||||||
| 		this.timeout(LONG_TEST_TIMEOUT); |  | ||||||
| 		await closeBrowser(); |  | ||||||
| 	}, |  | ||||||
| }; |  | ||||||
											
												
													File diff suppressed because it is too large
													Load Diff
												
											
										
									
								| @ -0,0 +1,5 @@ | |||||||
|  | import { closeBrowser } from "./test_utils/browser-creator.js"; | ||||||
|  | 
 | ||||||
|  | afterAll(async () => { | ||||||
|  | 	await closeBrowser(); | ||||||
|  | }); | ||||||
| @ -0,0 +1,16 @@ | |||||||
|  | import { defineConfig } from "vitest/config"; | ||||||
|  | 
 | ||||||
|  | export default defineConfig({ | ||||||
|  | 	test: { | ||||||
|  | 		testTimeout: 10000, | ||||||
|  | 		setupFiles: ["src/back/test-teardown.ts"], | ||||||
|  | 		exclude: ["docker_node_modules", "node_modules", "dist", "lib"], | ||||||
|  | 		globals: true, | ||||||
|  | 		coverage: { | ||||||
|  | 			exclude: ["docker_node_modules", "node_modules", "dist", "lib"], | ||||||
|  | 			enabled: true, | ||||||
|  | 			all: true, | ||||||
|  | 			include: ["src/**", "test?(-*).?(c|m)[jt]s?(x)"], | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
|  | }); | ||||||
| @ -1,37 +0,0 @@ | |||||||
| const path = require("path"); |  | ||||||
| 
 |  | ||||||
| module.exports = [ |  | ||||||
| 	{ |  | ||||||
| 		name: "front-end-components", |  | ||||||
| 		entry: { |  | ||||||
| 			bundle: "./src/front/index.ts", |  | ||||||
| 		}, |  | ||||||
| 
 |  | ||||||
| 		output: { |  | ||||||
| 			filename: "[name].js", |  | ||||||
| 			path: path.resolve(__dirname, "public/dist"), |  | ||||||
| 		}, |  | ||||||
| 
 |  | ||||||
| 		mode: "production", |  | ||||||
| 		devtool: "source-map", |  | ||||||
| 
 |  | ||||||
| 		resolve: { |  | ||||||
| 			extensions: [".ts", ".js"], |  | ||||||
| 		}, |  | ||||||
| 
 |  | ||||||
| 		module: { |  | ||||||
| 			rules: [ |  | ||||||
| 				{ |  | ||||||
| 					test: /\.js$/, |  | ||||||
| 					exclude: [/node_modules/], |  | ||||||
| 					use: [{ loader: "babel-loader" }], |  | ||||||
| 				}, |  | ||||||
| 				{ |  | ||||||
| 					test: /\.ts$/, |  | ||||||
| 					exclude: [/node_modules/], |  | ||||||
| 					use: [{ loader: "ts-loader" }], |  | ||||||
| 				}, |  | ||||||
| 			], |  | ||||||
| 		}, |  | ||||||
| 	}, |  | ||||||
| ]; |  | ||||||
					Loading…
					
					
				
		Reference in New Issue