From e749a0ba54a1bb620d49be13c98d8aa14f02143f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20J=C3=A4ppinen?= Date: Sat, 25 Apr 2020 10:11:38 +0300 Subject: [PATCH] test: remove redundant, misbehaving test This test failed differently on Windows than other platforms, but it doesn't really test anything new anyway --- test/__snapshots__/index.spec.js.snap | 6 ------ test/index.spec.js | 11 ----------- 2 files changed, 17 deletions(-) diff --git a/test/__snapshots__/index.spec.js.snap b/test/__snapshots__/index.spec.js.snap index 3046e8dbf..f29b66693 100644 --- a/test/__snapshots__/index.spec.js.snap +++ b/test/__snapshots__/index.spec.js.snap @@ -1,11 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lintStaged should exit with code 1 on linter errors 1`] = ` -" -ERROR -× node -e \\"process.exit(1)\\" failed without output (FAILED)." -`; - exports[`lintStaged should load an npm config package when specified 1`] = ` " LOG Running lint-staged with the following config: diff --git a/test/index.spec.js b/test/index.spec.js index a13455f36..6d41f736d 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -173,15 +173,4 @@ describe('lintStaged', () => { expect(logger.printHistory()).toMatchSnapshot() }) - - it('should exit with code 1 on linter errors', async () => { - const config = { - '*': 'node -e "process.exit(1)"' - } - mockCosmiconfigWith({ config }) - getStagedFiles.mockImplementationOnce(async () => ['sample.java']) - const passed = await lintStaged({ quiet: true, shell: true }, logger) - expect(logger.printHistory()).toMatchSnapshot() - expect(passed).toBe(false) - }) })