Skip to content

Commit

Permalink
test: assert deferreds is empty on compilation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Jun 7, 2021
1 parent 5af8b76 commit 6f3a5fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions npm/webpack-preprocessor/test/unit/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ describe('webpack preprocessor', function () {

it('it rejects with error when an err', function () {
this.compilerApi.run.yields(this.err)
expect(preprocessor.__bundles()[this.file.filePath]).to.be.undefined

return this.run().catch((err) => {
expect(preprocessor.__bundles()[this.file.filePath].deferreds).to.be.empty
expect(err.stack).to.equal(this.err.stack)
})
})
Expand Down

0 comments on commit 6f3a5fb

Please sign in to comment.