Skip to content

Commit

Permalink
Remove cat.exe
Browse files Browse the repository at this point in the history
The single test it was used for would only fail if the underlying
BufferedProcess had a bug, as the execNode tests the same path in our
code.
  • Loading branch information
Arcanemagus committed Feb 3, 2016
1 parent 108f98a commit b68452b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Binary file removed spec/fixtures/cat.exe
Binary file not shown.
11 changes: 1 addition & 10 deletions spec/helper-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const stderrFile = path.join(__dirname, 'fixtures', 'stderr.js')
const stderrScript = path.join(__dirname, 'fixtures', 'stderr') +
(process.platform !== 'win32' ? '.sh' : '.bat')
const testFile = path.join(__dirname, 'fixtures', 'test.txt')
const winCatBin = path.join(__dirname, 'fixtures', 'cat.exe')
const packageJsonPath = fs.realpathSync(`${__dirname}/../package.json`)

const testContents = fs.readFileSync(testFile).toString()
Expand All @@ -20,7 +19,7 @@ describe('linter helpers', () => {
describe('::exec*', () => {
// `cd` with no params prints the current dir on Windows
const pwdCommand = process.platform !== 'win32' ? 'pwd' : 'cd'
const catCommand = process.platform !== 'win32' ? 'cat' : winCatBin
const catCommand = process.platform !== 'win32' ? 'cat' : 'type'

it('cries when no argument is passed', () => {
expect(() =>
Expand Down Expand Up @@ -72,14 +71,6 @@ describe('linter helpers', () => {
expect(data).toBe('STDOUTWow')
)
)
return waitsForPromise(() =>
helpers.exec(catCommand, [], {
stream: 'stdout',
stdin: testContents
}).then(text =>
expect(text).toBe(testContents)
)
)
})

it("throws if stderr is written to but wasn't expected", () => {
Expand Down

0 comments on commit b68452b

Please sign in to comment.