Skip to content

Commit

Permalink
test: remove redundant, misbehaving test
Browse files Browse the repository at this point in the history
This test failed differently on Windows than other platforms, but it doesn't really test anything new anyway
  • Loading branch information
iiroj committed Apr 25, 2020
1 parent 16848d8 commit e749a0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
6 changes: 0 additions & 6 deletions test/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
11 changes: 0 additions & 11 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit e749a0b

Please sign in to comment.