Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Commit

Permalink
test: Cut a test
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Dec 30, 2018
1 parent 216d160 commit 8e2945d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions test/src/find-npm.js
Expand Up @@ -67,26 +67,6 @@ describe('Find-Npm', () => {
.catch(err => console.log(err))
})

it(`should remove newlines from npm's output`, (done) => {
const utilMock = {
isPathAccessible: (path) => path.includes('test-npm')
}

mockery.registerMock('child_process', cpMock)
mockery.registerMock('./utils', utilMock)

const findNpm = require('../../src/find-npm')
execReturnValue = 'C:\\test-npm\n'

findNpm()
.then(result => {
const containsOnlyOneNewline = result.message.includes('C:\\test-npm\n\u001b')
containsOnlyOneNewline.should.be.true;
done()
})
.catch(err => console.log(err))
})

it(`should prefer PowerShell over npm (if both exist)`, (done) => {
const fsMock = {
accessSync: (path) => true
Expand Down

0 comments on commit 8e2945d

Please sign in to comment.