Skip to content

Commit b2882c8

Browse files
author
Frank Schmid
committed
Fixed unit test and comment
1 parent f4f0759 commit b2882c8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/wpwatch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ module.exports = {
4545

4646
process.env.SLS_DEBUG && this.serverless.cli.log(`Webpack watch invoke: HASH NEW=${stats.hash} CUR=${lastHash}`);
4747

48-
// If the file hash did not change there were no effective code changes detected (comment only changed do not change the compile hash!)
48+
// If the file hash did not change there were no effective code changes detected
49+
// (comment changes do not change the compile hash and do not account for a rebuild!)
4950
// See here: https://webpack.js.org/api/node/#watching (note below watching)
5051
if (stats && stats.hash === lastHash) {
5152
if (firstRun) {

tests/wpwatch.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe('wpwatch', function() {
160160
return expect(wpwatch()).to.be.fulfilled
161161
.then(() => BbPromise.delay(3000))
162162
.then(() => BbPromise.join(
163-
expect(spawnStub).to.have.been.calledOnce,
163+
expect(spawnStub).to.not.have.been.called,
164164
expect(webpackMock.compilerMock.watch).to.have.been.calledOnce,
165165
expect(watchCallbackSpy).to.have.been.calledTwice
166166
));

0 commit comments

Comments
 (0)