From 9dde78a9efd45e1eb43996664e8443665f7832bf Mon Sep 17 00:00:00 2001 From: Gvozd Date: Fri, 11 Dec 2020 11:41:56 +0300 Subject: [PATCH] test: test bypassing `node-notifier` options --- test/WebpackNotifierPlugin.test.ts | 5 +++++ test/__snapshots__/WebpackNotifierPlugin.test.ts.snap | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/test/WebpackNotifierPlugin.test.ts b/test/WebpackNotifierPlugin.test.ts index ae3fb420..57ae1d37 100644 --- a/test/WebpackNotifierPlugin.test.ts +++ b/test/WebpackNotifierPlugin.test.ts @@ -104,4 +104,9 @@ describe('WebpackNotifierPlugin', () => { [['successful'], undefined, {plugins: [new ChildCompilationPlugin(), new ChildCompilationPlugin('Warning')]}], ])('%j %j %j', testChangesFlow, 10e3); }); + describe('child compilation errors', () => { + test.each([ + [['successful'], {appId: 'com.squirrel.your.app'}],// TODO mark as deprecate at v2.x + ])('%j %j %j', testChangesFlow, 10e3); + }); }); diff --git a/test/__snapshots__/WebpackNotifierPlugin.test.ts.snap b/test/__snapshots__/WebpackNotifierPlugin.test.ts.snap index 3eb43b08..8aeea5ee 100644 --- a/test/__snapshots__/WebpackNotifierPlugin.test.ts.snap +++ b/test/__snapshots__/WebpackNotifierPlugin.test.ts.snap @@ -1,5 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`WebpackNotifierPlugin child compilation errors ["successful"] {"appId":"com.squirrel.your.app"} %j: after "successful" build 1`] = ` +Object { + "appId": "com.squirrel.your.app", + "contentImage": "__dirname/logo.png", + "message": "Build successful", + "title": "Webpack", +} +`; + exports[`WebpackNotifierPlugin child compilation errors ["successful"] undefined {"plugins":[{"level":"Error","levelCollectionKey":"errors"}]}: after "successful" build 1`] = ` Object { "contentImage": "__dirname/logo.png",