mirror of https://github.com/webpack/webpack.git
				
				
				
			remove outdated unittest
This commit is contained in:
		
							parent
							
								
									e39e9c134c
								
							
						
					
					
						commit
						fbd97de07b
					
				| 
						 | 
				
			
			@ -1,46 +0,0 @@
 | 
			
		|||
/* globals describe, before, it */
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
const should = require("should");
 | 
			
		||||
const path = require("path");
 | 
			
		||||
 | 
			
		||||
const webpack = require("../lib/webpack");
 | 
			
		||||
const identifierUtils = require("../lib/util/identifier");
 | 
			
		||||
 | 
			
		||||
describe("RecordIdsPlugin", () => {
 | 
			
		||||
 | 
			
		||||
	let compiler;
 | 
			
		||||
 | 
			
		||||
	before(() => {
 | 
			
		||||
		compiler = webpack({
 | 
			
		||||
			entry: "./nodetest/entry",
 | 
			
		||||
			context: path.join(__dirname, "fixtures"),
 | 
			
		||||
			output: {
 | 
			
		||||
				path: path.join(__dirname, "nodetest", "js"),
 | 
			
		||||
				filename: "result1.js"
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		compiler.plugin("compilation", (compilation, callback) => {
 | 
			
		||||
			compilation.plugin("should-record", () => true);
 | 
			
		||||
		});
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	it("should cache identifiers", (done) => {
 | 
			
		||||
		compiler.compile((err, compilation) => {
 | 
			
		||||
			if(err) done(err);
 | 
			
		||||
			let pass = true;
 | 
			
		||||
			for(let i = 0; i < compilation.modules.length; i++) {
 | 
			
		||||
				try {
 | 
			
		||||
					should.exist(compilation.modules[i].portableId);
 | 
			
		||||
					compilation.modules[i].portableId.should.equal(identifierUtils.makePathsRelative(compiler.context, compilation.modules[i].identifier()));
 | 
			
		||||
				} catch(e) {
 | 
			
		||||
					done(e);
 | 
			
		||||
					pass = false;
 | 
			
		||||
					break;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			if(pass) done();
 | 
			
		||||
		});
 | 
			
		||||
	});
 | 
			
		||||
});
 | 
			
		||||
		Loading…
	
		Reference in New Issue