From fdba306c1dd3906f5bcf730cf798357911158819 Mon Sep 17 00:00:00 2001 From: Daniel Stockman Date: Thu, 27 Dec 2018 15:46:53 -0800 Subject: [PATCH] test(main-entry): Inline error snapshot --- .../test/__snapshots__/rollup-plugin-main-entry.test.js.snap | 3 --- .../test/rollup-plugin-main-entry.test.js | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 packages/rollup-plugin-main-entry/test/__snapshots__/rollup-plugin-main-entry.test.js.snap diff --git a/packages/rollup-plugin-main-entry/test/__snapshots__/rollup-plugin-main-entry.test.js.snap b/packages/rollup-plugin-main-entry/test/__snapshots__/rollup-plugin-main-entry.test.js.snap deleted file mode 100644 index ba29fc2..0000000 --- a/packages/rollup-plugin-main-entry/test/__snapshots__/rollup-plugin-main-entry.test.js.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`rollup-plugin-main-entry throws an error when no pkg.main supplied 1`] = `"required field 'main' missing in package.json"`; diff --git a/packages/rollup-plugin-main-entry/test/rollup-plugin-main-entry.test.js b/packages/rollup-plugin-main-entry/test/rollup-plugin-main-entry.test.js index 580f0ba..e1a4431 100644 --- a/packages/rollup-plugin-main-entry/test/rollup-plugin-main-entry.test.js +++ b/packages/rollup-plugin-main-entry/test/rollup-plugin-main-entry.test.js @@ -32,7 +32,9 @@ describe('rollup-plugin-main-entry', () => { plugins: [mainEntry({ name: 'oops' })], }); } catch (err) { - expect(err.message).toMatchSnapshot(); + expect(err).toMatchInlineSnapshot( + `[TypeError: required field 'main' missing in package.json]` + ); } });