| 
									
										
										
										
											2017-01-17 23:40:00 +08:00
										 |  |  | "use strict"; | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-17 23:40:00 +08:00
										 |  |  | const Chunk = require("../lib/Chunk"); | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-17 23:40:00 +08:00
										 |  |  | describe("Chunk", () => { | 
					
						
							|  |  |  | 	let ChunkInstance; | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-24 20:17:21 +08:00
										 |  |  | 	beforeEach(() => { | 
					
						
							|  |  |  | 		ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test"); | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-24 20:17:21 +08:00
										 |  |  | 	it("should have debugId more than 999", () => { | 
					
						
							|  |  |  | 		expect(ChunkInstance.debugId).toBeGreaterThan(999); | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-24 20:17:21 +08:00
										 |  |  | 	it("should not be the initial instance", () => { | 
					
						
							|  |  |  | 		expect(ChunkInstance.canBeInitial()).toBe(false); | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-17 23:40:00 +08:00
										 |  |  | 	describe("hasRuntime", () => { | 
					
						
							| 
									
										
										
										
											2018-01-24 20:17:21 +08:00
										 |  |  | 		it("returns false", () => { | 
					
						
							|  |  |  | 			expect(ChunkInstance.hasRuntime()).toBe(false); | 
					
						
							|  |  |  | 		}); | 
					
						
							| 
									
										
										
										
											2017-01-05 00:17:49 +08:00
										 |  |  | 	}); | 
					
						
							|  |  |  | }); |