mirror of https://github.com/webpack/webpack.git
added test for NormalModule.originalSource
This commit is contained in:
parent
9d8d32e1ed
commit
0cab30c950
|
|
@ -456,9 +456,9 @@ class NormalModule extends Module {
|
||||||
return new CachedSource(source);
|
return new CachedSource(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
originalSource() {
|
originalSource() {
|
||||||
return this._source;
|
return this._source;
|
||||||
}
|
}
|
||||||
|
|
||||||
getHighestTimestamp(keys, timestampsByKey) {
|
getHighestTimestamp(keys, timestampsByKey) {
|
||||||
let highestTimestamp = 0;
|
let highestTimestamp = 0;
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,16 @@ describe("NormalModule", function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("#originalSource", function() {
|
||||||
|
let expectedSource = "some source";
|
||||||
|
beforeEach(function() {
|
||||||
|
normalModule._source = new RawSource(expectedSource);
|
||||||
|
});
|
||||||
|
it("returns an original Source", function() {
|
||||||
|
normalModule.originalSource().should.eql(normalModule._source);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("#updateHashWithSource", function() {
|
describe("#updateHashWithSource", function() {
|
||||||
let hashSpy;
|
let hashSpy;
|
||||||
let hash;
|
let hash;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue