| 
									
										
										
										
											2017-02-10 06:35:55 +08:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-18 23:49:27 +08:00
										 |  |  | const should = require("should"); | 
					
						
							|  |  |  | const WebEnvironmentPlugin = require("../lib/web/WebEnvironmentPlugin"); | 
					
						
							| 
									
										
										
										
											2017-01-11 20:06:30 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-18 23:49:27 +08:00
										 |  |  | describe("WebEnvironmentPlugin", () => { | 
					
						
							|  |  |  | 	let WebEnvironmentPluginInstance; | 
					
						
							| 
									
										
										
										
											2017-01-11 20:06:30 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-18 23:49:27 +08:00
										 |  |  | 	before(() => WebEnvironmentPluginInstance = new WebEnvironmentPlugin("inputFileSystem", "outputFileSystem")); | 
					
						
							| 
									
										
										
										
											2017-01-11 20:06:30 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-18 23:49:27 +08:00
										 |  |  | 	describe("apply", () => { | 
					
						
							|  |  |  | 		let compileSpy; | 
					
						
							|  |  |  | 		before(() => { | 
					
						
							| 
									
										
										
										
											2017-01-11 20:06:30 +08:00
										 |  |  | 			compileSpy = { | 
					
						
							|  |  |  | 				outputFileSystem: "otherOutputFileSystem" | 
					
						
							|  |  |  | 			}; | 
					
						
							|  |  |  | 			WebEnvironmentPluginInstance.apply(compileSpy); | 
					
						
							|  |  |  | 		}); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-18 23:49:27 +08:00
										 |  |  | 		it("should set compiler.outputFileSystem information with the same as setted in WebEnvironmentPlugin", () => | 
					
						
							|  |  |  | 			should(compileSpy.outputFileSystem).be.eql(WebEnvironmentPluginInstance.outputFileSystem)); | 
					
						
							| 
									
										
										
										
											2017-01-11 20:06:30 +08:00
										 |  |  | 	}); | 
					
						
							|  |  |  | }); |