Skip to content

Commit 4c10a1f

Browse files
committed
added test for Module#toString
1 parent 7adbc2d commit 4c10a1f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎test/NormalModule.test.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require("should");
44
const sinon = require("sinon");
55
const NormalModule = require("../lib/NormalModule");
6-
const path = require("path");
76
const SourceMapSource = require("webpack-sources").SourceMapSource;
87
const OriginalSource = require("webpack-sources").OriginalSource;
98
const RawSource = require("webpack-sources").RawSource;
@@ -38,6 +37,12 @@ describe("NormalModule", function() {
3837
it("returns an identifier for this module", function() {
3938
normalModule.identifier().should.eql(request);
4039
});
40+
it("returns an identifier from toString", function() {
41+
normalModule.debugId = 1000;
42+
normalModule.toString().should.eql("Module[1000]");
43+
normalModule.id = 1;
44+
normalModule.toString().should.eql("Module[1]");
45+
});
4146
});
4247

4348
describe("#readableIdentifier", function() {

0 commit comments

Comments
 (0)