mirror of https://github.com/webpack/webpack.git
				
				
				
			skip worker tests when worker_threads is not supported
This commit is contained in:
		
							parent
							
								
									a0d72e6e8c
								
							
						
					
					
						commit
						4c3e18fb39
					
				|  | @ -27,15 +27,18 @@ const describeCases = config => { | ||||||
| 		categories.forEach(category => { | 		categories.forEach(category => { | ||||||
| 			describe(category.name, () => { | 			describe(category.name, () => { | ||||||
| 				category.tests.forEach(testName => { | 				category.tests.forEach(testName => { | ||||||
|  | 					const testDirectory = path.join(casesPath, category.name, testName); | ||||||
|  | 					const filterPath = path.join(testDirectory, "test.filter.js"); | ||||||
|  | 					if (fs.existsSync(filterPath) && !require(filterPath)()) { | ||||||
|  | 						describe.skip(testName, () => { | ||||||
|  | 							it("filtered", () => {}); | ||||||
|  | 						}); | ||||||
|  | 						return; | ||||||
|  | 					} | ||||||
| 					describe(testName, () => { | 					describe(testName, () => { | ||||||
| 						it( | 						it( | ||||||
| 							testName + " should compile", | 							testName + " should compile", | ||||||
| 							done => { | 							done => { | ||||||
| 								const testDirectory = path.join( |  | ||||||
| 									casesPath, |  | ||||||
| 									category.name, |  | ||||||
| 									testName |  | ||||||
| 								); |  | ||||||
| 								const outputDirectory = path.join( | 								const outputDirectory = path.join( | ||||||
| 									__dirname, | 									__dirname, | ||||||
| 									"js", | 									"js", | ||||||
|  |  | ||||||
|  | @ -0,0 +1,5 @@ | ||||||
|  | var supportsWorker = require("../../../helpers/supportsWorker"); | ||||||
|  | 
 | ||||||
|  | module.exports = function (config) { | ||||||
|  | 	return supportsWorker(); | ||||||
|  | }; | ||||||
		Loading…
	
		Reference in New Issue