From b1a08b8da1e7c69035352e2400d803b6f62730db Mon Sep 17 00:00:00 2001 From: Cameron Hunter Date: Thu, 4 Jul 2019 22:59:35 -0700 Subject: [PATCH] fix: snapshot with fully-resolved path name --- test/__snapshots__/index.spec.js.snap | 2 +- test/index.spec.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/__snapshots__/index.spec.js.snap b/test/__snapshots__/index.spec.js.snap index 61101f37e..a975dfc5f 100644 --- a/test/__snapshots__/index.spec.js.snap +++ b/test/__snapshots__/index.spec.js.snap @@ -58,7 +58,7 @@ ERROR Please make sure you have created it correctly. See https://github.com/okonet/lint-staged#configuration." `; -exports[`lintStaged should print helpful error message when explicit config file is not found 2`] = ` +exports[`lintStaged should print helpful error message when explicit config file is not found 1`] = ` ERROR Could not parse lint-staged config. diff --git a/test/index.spec.js b/test/index.spec.js index 5f0c55a11..ece57946d 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -118,9 +118,7 @@ describe('lintStaged', () => { await expect( lintStaged({ configPath: nonExistentConfig, quiet: true }, logger) - ).rejects.toMatchInlineSnapshot( - `[Error: ENOENT: no such file or directory, open '/Users/chunter/workspace/github/cameronhunter/lint-staged/fake-config-file.yml']` - ) + ).rejects.toThrowError() expect(logger.printHistory()).toMatchSnapshot() })