| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const path = require("path"); | 
					
						
							| 
									
										
										
										
											2019-06-11 19:09:42 +08:00
										 |  |  | const fs = require("graceful-fs"); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | const vm = require("vm"); | 
					
						
							|  |  |  | const mkdirp = require("mkdirp"); | 
					
						
							| 
									
										
										
										
											2018-10-18 04:15:46 +08:00
										 |  |  | const rimraf = require("rimraf"); | 
					
						
							| 
									
										
										
										
											2018-09-10 07:16:35 +08:00
										 |  |  | const TerserPlugin = require("terser-webpack-plugin"); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | const checkArrayExpectation = require("./checkArrayExpectation"); | 
					
						
							| 
									
										
										
										
											2018-08-02 19:05:48 +08:00
										 |  |  | const createLazyTestEnv = require("./helpers/createLazyTestEnv"); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-09 21:26:35 +08:00
										 |  |  | const webpack = require(".."); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-10 07:16:35 +08:00
										 |  |  | const terserForTesting = new TerserPlugin({ | 
					
						
							| 
									
										
										
										
											2018-02-25 18:41:05 +08:00
										 |  |  | 	cache: false, | 
					
						
							|  |  |  | 	parallel: false, | 
					
						
							|  |  |  | 	sourceMap: true | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | const DEFAULT_OPTIMIZATIONS = { | 
					
						
							|  |  |  | 	removeAvailableModules: true, | 
					
						
							|  |  |  | 	removeEmptyChunks: true, | 
					
						
							| 
									
										
										
										
											2018-02-25 18:41:05 +08:00
										 |  |  | 	mergeDuplicateChunks: true, | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 	flagIncludedChunks: true, | 
					
						
							|  |  |  | 	sideEffects: true, | 
					
						
							|  |  |  | 	providedExports: true, | 
					
						
							|  |  |  | 	usedExports: true, | 
					
						
							| 
									
										
										
										
											2019-01-28 17:40:32 +08:00
										 |  |  | 	mangleExports: true, | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 	noEmitOnErrors: false, | 
					
						
							|  |  |  | 	concatenateModules: false, | 
					
						
							| 
									
										
										
										
											2018-07-11 17:51:42 +08:00
										 |  |  | 	moduleIds: "size", | 
					
						
							|  |  |  | 	chunkIds: "size", | 
					
						
							| 
									
										
										
										
											2018-09-10 07:16:35 +08:00
										 |  |  | 	minimizer: [terserForTesting] | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const NO_EMIT_ON_ERRORS_OPTIMIZATIONS = { | 
					
						
							| 
									
										
										
										
											2018-02-25 18:41:05 +08:00
										 |  |  | 	noEmitOnErrors: false, | 
					
						
							| 
									
										
										
										
											2018-09-10 07:16:35 +08:00
										 |  |  | 	minimizer: [terserForTesting] | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const casesPath = path.join(__dirname, "cases"); | 
					
						
							|  |  |  | let categories = fs.readdirSync(casesPath); | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | categories = categories.map(cat => { | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 	return { | 
					
						
							|  |  |  | 		name: cat, | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 		tests: fs | 
					
						
							|  |  |  | 			.readdirSync(path.join(casesPath, cat)) | 
					
						
							|  |  |  | 			.filter(folder => folder.indexOf("_") < 0) | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 	}; | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | const describeCases = config => { | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 	describe(config.name, () => { | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 		categories.forEach(category => { | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 			describe(category.name, function() { | 
					
						
							| 
									
										
										
										
											2018-05-18 22:34:01 +08:00
										 |  |  | 				jest.setTimeout(20000); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 				category.tests | 
					
						
							|  |  |  | 					.filter(test => { | 
					
						
							|  |  |  | 						const testDirectory = path.join(casesPath, category.name, test); | 
					
						
							|  |  |  | 						const filterPath = path.join(testDirectory, "test.filter.js"); | 
					
						
							|  |  |  | 						if (fs.existsSync(filterPath) && !require(filterPath)(config)) { | 
					
						
							| 
									
										
										
										
											2019-03-29 06:14:52 +08:00
										 |  |  | 							describe.skip(test, () => { | 
					
						
							|  |  |  | 								it("filtered", () => {}); | 
					
						
							|  |  |  | 							}); | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 							return false; | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 						return true; | 
					
						
							|  |  |  | 					}) | 
					
						
							|  |  |  | 					.forEach(testName => { | 
					
						
							|  |  |  | 						describe(testName, () => { | 
					
						
							|  |  |  | 							const testDirectory = path.join( | 
					
						
							|  |  |  | 								casesPath, | 
					
						
							|  |  |  | 								category.name, | 
					
						
							|  |  |  | 								testName | 
					
						
							|  |  |  | 							); | 
					
						
							|  |  |  | 							const outputDirectory = path.join( | 
					
						
							|  |  |  | 								__dirname, | 
					
						
							|  |  |  | 								"js", | 
					
						
							|  |  |  | 								config.name, | 
					
						
							|  |  |  | 								category.name, | 
					
						
							|  |  |  | 								testName | 
					
						
							|  |  |  | 							); | 
					
						
							| 
									
										
										
										
											2018-10-18 04:15:46 +08:00
										 |  |  | 							const cacheDirectory = path.join( | 
					
						
							|  |  |  | 								__dirname, | 
					
						
							|  |  |  | 								"js/.cache", | 
					
						
							|  |  |  | 								config.name, | 
					
						
							|  |  |  | 								category.name, | 
					
						
							|  |  |  | 								testName | 
					
						
							|  |  |  | 							); | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 							const options = { | 
					
						
							|  |  |  | 								context: casesPath, | 
					
						
							|  |  |  | 								entry: "./" + category.name + "/" + testName + "/index", | 
					
						
							|  |  |  | 								target: "async-node", | 
					
						
							|  |  |  | 								devtool: config.devtool, | 
					
						
							|  |  |  | 								mode: config.mode || "none", | 
					
						
							|  |  |  | 								optimization: config.mode | 
					
						
							|  |  |  | 									? NO_EMIT_ON_ERRORS_OPTIMIZATIONS | 
					
						
							| 
									
										
										
										
											2019-06-19 19:16:05 +08:00
										 |  |  | 									: { | 
					
						
							| 
									
										
										
										
											2019-09-04 15:08:44 +08:00
										 |  |  | 											...DEFAULT_OPTIMIZATIONS, | 
					
						
							|  |  |  | 											...config.optimization | 
					
						
							| 
									
										
										
										
											2019-06-19 19:16:05 +08:00
										 |  |  | 									  }, | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 								performance: { | 
					
						
							|  |  |  | 									hints: false | 
					
						
							|  |  |  | 								}, | 
					
						
							| 
									
										
										
										
											2019-05-22 21:54:44 +08:00
										 |  |  | 								node: { | 
					
						
							|  |  |  | 									__dirname: "mock", | 
					
						
							|  |  |  | 									__filename: "mock" | 
					
						
							|  |  |  | 								}, | 
					
						
							| 
									
										
										
										
											2019-06-19 19:16:05 +08:00
										 |  |  | 								cache: config.cache && { | 
					
						
							|  |  |  | 									cacheDirectory, | 
					
						
							|  |  |  | 									...config.cache | 
					
						
							|  |  |  | 								}, | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 								output: { | 
					
						
							|  |  |  | 									pathinfo: true, | 
					
						
							|  |  |  | 									path: outputDirectory, | 
					
						
							|  |  |  | 									filename: "bundle.js" | 
					
						
							|  |  |  | 								}, | 
					
						
							|  |  |  | 								resolve: { | 
					
						
							|  |  |  | 									modules: ["web_modules", "node_modules"], | 
					
						
							|  |  |  | 									mainFields: [ | 
					
						
							|  |  |  | 										"webpack", | 
					
						
							|  |  |  | 										"browser", | 
					
						
							|  |  |  | 										"web", | 
					
						
							|  |  |  | 										"browserify", | 
					
						
							|  |  |  | 										["jam", "main"], | 
					
						
							|  |  |  | 										"main" | 
					
						
							|  |  |  | 									], | 
					
						
							|  |  |  | 									aliasFields: ["browser"], | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 									extensions: [".mjs", ".webpack.js", ".web.js", ".js", ".json"] | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 								}, | 
					
						
							|  |  |  | 								resolveLoader: { | 
					
						
							|  |  |  | 									modules: [ | 
					
						
							|  |  |  | 										"web_loaders", | 
					
						
							|  |  |  | 										"web_modules", | 
					
						
							|  |  |  | 										"node_loaders", | 
					
						
							|  |  |  | 										"node_modules" | 
					
						
							|  |  |  | 									], | 
					
						
							|  |  |  | 									mainFields: ["webpackLoader", "webLoader", "loader", "main"], | 
					
						
							|  |  |  | 									extensions: [ | 
					
						
							|  |  |  | 										".webpack-loader.js", | 
					
						
							|  |  |  | 										".web-loader.js", | 
					
						
							|  |  |  | 										".loader.js", | 
					
						
							|  |  |  | 										".js" | 
					
						
							|  |  |  | 									] | 
					
						
							|  |  |  | 								}, | 
					
						
							|  |  |  | 								module: { | 
					
						
							|  |  |  | 									rules: [ | 
					
						
							|  |  |  | 										{ | 
					
						
							|  |  |  | 											test: /\.coffee$/, | 
					
						
							|  |  |  | 											loader: "coffee-loader" | 
					
						
							|  |  |  | 										}, | 
					
						
							|  |  |  | 										{ | 
					
						
							| 
									
										
										
										
											2018-05-10 15:13:17 +08:00
										 |  |  | 											test: /\.pug/, | 
					
						
							|  |  |  | 											loader: "pug-loader" | 
					
						
							| 
									
										
										
										
											2018-05-24 20:12:11 +08:00
										 |  |  | 										}, | 
					
						
							|  |  |  | 										{ | 
					
						
							|  |  |  | 											test: /\.wat$/i, | 
					
						
							|  |  |  | 											loader: "wast-loader", | 
					
						
							| 
									
										
										
										
											2019-07-15 21:03:29 +08:00
										 |  |  | 											type: "webassembly/async" | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 										} | 
					
						
							|  |  |  | 									] | 
					
						
							|  |  |  | 								}, | 
					
						
							|  |  |  | 								plugins: (config.plugins || []).concat(function() { | 
					
						
							|  |  |  | 									this.hooks.compilation.tap("TestCasesTest", compilation => { | 
					
						
							|  |  |  | 										[ | 
					
						
							|  |  |  | 											"optimize", | 
					
						
							| 
									
										
										
										
											2018-07-31 04:30:27 +08:00
										 |  |  | 											"optimizeModules", | 
					
						
							|  |  |  | 											"optimizeChunks", | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 											"afterOptimizeTree", | 
					
						
							|  |  |  | 											"afterOptimizeAssets" | 
					
						
							|  |  |  | 										].forEach(hook => { | 
					
						
							|  |  |  | 											compilation.hooks[hook].tap("TestCasesTest", () => | 
					
						
							|  |  |  | 												compilation.checkConstraints() | 
					
						
							|  |  |  | 											); | 
					
						
							|  |  |  | 										}); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 									}); | 
					
						
							| 
									
										
										
										
											2019-06-04 17:26:04 +08:00
										 |  |  | 								}), | 
					
						
							|  |  |  | 								experiments: { | 
					
						
							| 
									
										
										
										
											2019-06-05 19:25:15 +08:00
										 |  |  | 									mjs: true, | 
					
						
							|  |  |  | 									asyncWebAssembly: true, | 
					
						
							|  |  |  | 									topLevelAwait: true, | 
					
						
							|  |  |  | 									importAwait: true | 
					
						
							| 
									
										
										
										
											2019-06-04 17:26:04 +08:00
										 |  |  | 								} | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 							}; | 
					
						
							| 
									
										
										
										
											2018-10-18 04:15:46 +08:00
										 |  |  | 							beforeAll(done => { | 
					
						
							|  |  |  | 								rimraf(cacheDirectory, done); | 
					
						
							|  |  |  | 							}); | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 							if (config.cache) { | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 								it(`${testName} should pre-compile to fill disk cache (1st)`, done => { | 
					
						
							| 
									
										
										
										
											2019-02-20 18:32:12 +08:00
										 |  |  | 									const oldPath = options.output.path; | 
					
						
							|  |  |  | 									options.output.path = path.join( | 
					
						
							|  |  |  | 										options.output.path, | 
					
						
							|  |  |  | 										"cache1" | 
					
						
							|  |  |  | 									); | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 									webpack(options, err => { | 
					
						
							| 
									
										
										
										
											2019-02-20 18:32:12 +08:00
										 |  |  | 										options.output.path = oldPath; | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 										if (err) return done(err); | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 										done(); | 
					
						
							|  |  |  | 									}); | 
					
						
							| 
									
										
										
										
											2019-06-13 17:32:16 +08:00
										 |  |  | 								}, 60000); | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 								it(`${testName} should pre-compile to fill disk cache (2nd)`, done => { | 
					
						
							| 
									
										
										
										
											2019-02-20 18:32:12 +08:00
										 |  |  | 									const oldPath = options.output.path; | 
					
						
							|  |  |  | 									options.output.path = path.join( | 
					
						
							|  |  |  | 										options.output.path, | 
					
						
							|  |  |  | 										"cache2" | 
					
						
							|  |  |  | 									); | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 									webpack(options, err => { | 
					
						
							| 
									
										
										
										
											2019-02-20 18:32:12 +08:00
										 |  |  | 										options.output.path = oldPath; | 
					
						
							| 
									
										
										
										
											2019-01-05 21:58:06 +08:00
										 |  |  | 										if (err) return done(err); | 
					
						
							|  |  |  | 										done(); | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 									}); | 
					
						
							| 
									
										
										
										
											2019-06-13 17:32:16 +08:00
										 |  |  | 								}, 10000); | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 							} | 
					
						
							| 
									
										
										
										
											2018-03-06 05:48:18 +08:00
										 |  |  | 							it( | 
					
						
							|  |  |  | 								testName + " should compile", | 
					
						
							|  |  |  | 								done => { | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 									const compiler = webpack(options); | 
					
						
							|  |  |  | 									const run = () => { | 
					
						
							|  |  |  | 										compiler.run((err, stats) => { | 
					
						
							|  |  |  | 											if (err) return done(err); | 
					
						
							|  |  |  | 											compiler.close(err => { | 
					
						
							|  |  |  | 												if (err) return done(err); | 
					
						
							|  |  |  | 												const statOptions = { | 
					
						
							|  |  |  | 													preset: "verbose", | 
					
						
							|  |  |  | 													colors: false | 
					
						
							| 
									
										
										
										
											2018-03-06 05:48:18 +08:00
										 |  |  | 												}; | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 												mkdirp.sync(outputDirectory); | 
					
						
							|  |  |  | 												fs.writeFileSync( | 
					
						
							|  |  |  | 													path.join(outputDirectory, "stats.txt"), | 
					
						
							|  |  |  | 													stats.toString(statOptions), | 
					
						
							|  |  |  | 													"utf-8" | 
					
						
							| 
									
										
										
										
											2018-03-06 05:48:18 +08:00
										 |  |  | 												); | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 												const jsonStats = stats.toJson({ | 
					
						
							|  |  |  | 													errorDetails: true | 
					
						
							|  |  |  | 												}); | 
					
						
							|  |  |  | 												if ( | 
					
						
							|  |  |  | 													checkArrayExpectation( | 
					
						
							|  |  |  | 														testDirectory, | 
					
						
							|  |  |  | 														jsonStats, | 
					
						
							|  |  |  | 														"error", | 
					
						
							|  |  |  | 														"Error", | 
					
						
							|  |  |  | 														done | 
					
						
							|  |  |  | 													) | 
					
						
							|  |  |  | 												) | 
					
						
							|  |  |  | 													return; | 
					
						
							|  |  |  | 												if ( | 
					
						
							|  |  |  | 													checkArrayExpectation( | 
					
						
							|  |  |  | 														testDirectory, | 
					
						
							|  |  |  | 														jsonStats, | 
					
						
							|  |  |  | 														"warning", | 
					
						
							|  |  |  | 														"Warning", | 
					
						
							|  |  |  | 														done | 
					
						
							|  |  |  | 													) | 
					
						
							|  |  |  | 												) | 
					
						
							|  |  |  | 													return; | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 												Promise.resolve().then(done); | 
					
						
							|  |  |  | 											}); | 
					
						
							|  |  |  | 										}); | 
					
						
							|  |  |  | 									}; | 
					
						
							|  |  |  | 									if (config.cache) { | 
					
						
							|  |  |  | 										// pre-compile to fill memory cache
 | 
					
						
							|  |  |  | 										compiler.run(err => { | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 											if (err) return done(err); | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 											run(); | 
					
						
							| 
									
										
										
										
											2018-10-25 17:18:45 +08:00
										 |  |  | 										}); | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 									} else { | 
					
						
							|  |  |  | 										run(); | 
					
						
							|  |  |  | 									} | 
					
						
							| 
									
										
										
										
											2018-03-06 05:48:18 +08:00
										 |  |  | 								}, | 
					
						
							| 
									
										
										
										
											2019-06-13 17:32:16 +08:00
										 |  |  | 								config.cache ? 10000 : 60000 | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 							); | 
					
						
							| 
									
										
										
										
											2018-08-02 19:05:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-20 23:29:35 +08:00
										 |  |  | 							it( | 
					
						
							|  |  |  | 								testName + " should load the compiled tests", | 
					
						
							|  |  |  | 								done => { | 
					
						
							|  |  |  | 									function _require(module) { | 
					
						
							|  |  |  | 										if (module.substr(0, 2) === "./") { | 
					
						
							|  |  |  | 											const p = path.join(outputDirectory, module); | 
					
						
							|  |  |  | 											const fn = vm.runInThisContext( | 
					
						
							|  |  |  | 												"(function(require, module, exports, __dirname, it, expect) {" + | 
					
						
							|  |  |  | 													"global.expect = expect;" + | 
					
						
							|  |  |  | 													'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + | 
					
						
							|  |  |  | 													fs.readFileSync(p, "utf-8") + | 
					
						
							|  |  |  | 													"\n})", | 
					
						
							|  |  |  | 												p | 
					
						
							|  |  |  | 											); | 
					
						
							|  |  |  | 											const m = { | 
					
						
							|  |  |  | 												exports: {}, | 
					
						
							|  |  |  | 												webpackTestSuiteModule: true | 
					
						
							|  |  |  | 											}; | 
					
						
							|  |  |  | 											fn.call( | 
					
						
							|  |  |  | 												m.exports, | 
					
						
							|  |  |  | 												_require, | 
					
						
							|  |  |  | 												m, | 
					
						
							|  |  |  | 												m.exports, | 
					
						
							|  |  |  | 												outputDirectory, | 
					
						
							|  |  |  | 												_it, | 
					
						
							|  |  |  | 												expect | 
					
						
							|  |  |  | 											); | 
					
						
							|  |  |  | 											return m.exports; | 
					
						
							|  |  |  | 										} else return require(module); | 
					
						
							|  |  |  | 									} | 
					
						
							|  |  |  | 									_require.webpackTestSuiteRequire = true; | 
					
						
							|  |  |  | 									_require("./bundle.js"); | 
					
						
							|  |  |  | 									if (getNumberOfTests() === 0) | 
					
						
							|  |  |  | 										return done(new Error("No tests exported by test case")); | 
					
						
							|  |  |  | 									done(); | 
					
						
							|  |  |  | 								}, | 
					
						
							|  |  |  | 								10000 | 
					
						
							|  |  |  | 							); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-02 19:05:48 +08:00
										 |  |  | 							const { it: _it, getNumberOfTests } = createLazyTestEnv( | 
					
						
							|  |  |  | 								jasmine.getEnv(), | 
					
						
							|  |  |  | 								10000 | 
					
						
							|  |  |  | 							); | 
					
						
							| 
									
										
										
										
											2018-02-25 18:46:17 +08:00
										 |  |  | 						}); | 
					
						
							| 
									
										
										
										
											2018-02-25 08:16:11 +08:00
										 |  |  | 					}); | 
					
						
							|  |  |  | 			}); | 
					
						
							|  |  |  | 		}); | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports.describeCases = describeCases; |