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 => { | ||||
| 			describe(category.name, () => { | ||||
| 				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, () => { | ||||
| 						it( | ||||
| 							testName + " should compile", | ||||
| 							done => { | ||||
| 								const testDirectory = path.join( | ||||
| 									casesPath, | ||||
| 									category.name, | ||||
| 									testName | ||||
| 								); | ||||
| 								const outputDirectory = path.join( | ||||
| 									__dirname, | ||||
| 									"js", | ||||
|  |  | |||
|  | @ -0,0 +1,5 @@ | |||
| var supportsWorker = require("../../../helpers/supportsWorker"); | ||||
| 
 | ||||
| module.exports = function (config) { | ||||
| 	return supportsWorker(); | ||||
| }; | ||||
		Loading…
	
		Reference in New Issue