Skip to content

Commit

Permalink
Merge pull request #732 from raineorshine/test-doctor-win32
Browse files Browse the repository at this point in the history
Fix test-doctor on win32
  • Loading branch information
raineorshine authored Sep 10, 2020
2 parents 6f1cd5c + 7d0ea17 commit 5ec2e18
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/test-doctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ chai.should()
chai.use(chaiAsPromised)

/** Run the ncu CLI. */
const ncu = (args, options) => spawn(path.join(__dirname, '../bin/cli.js'), args, options)
const ncu = (args, options) => spawn('node', [path.join(__dirname, '../bin/cli.js'), ...args], options)

describe('doctor', () => {
describe('doctor', function() {

this.timeout(30000)

it('print instructions when -u is not specified', async () => {
const cwd = path.join(__dirname, 'doctor/nopackagefile')
Expand All @@ -36,8 +38,6 @@ describe('doctor', () => {

it('upgrade dependencies when tests pass', async function () {

this.timeout(30000)

const cwd = path.join(__dirname, 'doctor/pass')
const pkgPath = path.join(cwd, 'package.json')
const lockfilePath = path.join(cwd, 'package-lock.json')
Expand Down Expand Up @@ -79,8 +79,6 @@ describe('doctor', () => {

it('pass through options', async function () {

this.timeout(30000)

const cwd = path.join(__dirname, 'doctor/options')
const pkgPath = path.join(cwd, 'package.json')
const lockfilePath = path.join(cwd, 'package-lock.json')
Expand Down Expand Up @@ -134,8 +132,6 @@ describe('doctor', () => {

it('identify broken upgrade', async function() {

this.timeout(30000)

const cwd = path.join(__dirname, 'doctor/fail')
const pkgPath = path.join(cwd, 'package.json')
const lockfilePath = path.join(cwd, 'package-lock.json')
Expand Down

0 comments on commit 5ec2e18

Please sign in to comment.