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() })