Skip to content

Commit 4f8a33b

Browse files
Add test for not sending deploy
1 parent f1a3122 commit 4f8a33b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/webpack/test/HoneybadgerSourceMapPlugin.test.js

+11
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,17 @@ describe('HoneybadgerSourceMapPlugin', function () {
190190
expect(compilation.errors.length).to.be.eq(1)
191191
expect(compilation.errors[0]).to.be.an.instanceof(Error)
192192
})
193+
194+
it('should not send a deploy notification if there are compilation errors', async function () {
195+
sinon.stub(plugin, 'uploadSourceMaps')
196+
.callsFake(() => { throw new Error() })
197+
sinon.stub(plugin, 'sendDeployNotification')
198+
199+
await plugin.afterEmit(compilation)
200+
201+
expect(plugin.uploadSourceMaps.callCount).to.eq(1)
202+
expect(plugin.sendDeployNotification.callCount).to.eq(0)
203+
})
193204
})
194205

195206
describe('getAssets', function () {

0 commit comments

Comments
 (0)