test(script-runners): fix on Windows

This commit is contained in:
Zoltan Kochan committed 2020-12-17 03:42:04 +02:00
1 parent 5b0b6e3dc4
commit efd81fb105
3 files changed
+5 -1

No files matched your search

@@ -41,6 +41,7 @@
"@types/ramda": "^0.27.32",
"@zkochan/rimraf": "^1.0.0",
"execa": "^4.1.0",
"is-windows": "^1.0.2",
"mz": "^2.7.0",
"write-yaml-file": "^4.1.1"
},
@@ -10,6 +10,7 @@ import prepare, { preparePackages } from '@pnpm/prepare'
import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
import { DEFAULT_OPTS, REGISTRY } from './utils'
import execa = require('execa')
import isWindows = require('is-windows')
import fs = require('mz/fs')
import path = require('path')
import writeYamlFile = require('write-yaml-file')
@@ -389,7 +390,7 @@ test('pnpm run with custom shell', async () => {
dir: process.cwd(),
extraBinPaths: [],
rawConfig: {},
scriptShell: path.resolve('node_modules/.bin/shell-mock'),
scriptShell: path.resolve(`node_modules/.bin/shell-mock${isWindows() ? '.cmd' : ''}`),
}, ['build'])
expect((await import(path.resolve('shell-input.json'))).default).toStrictEqual(['-c', 'foo bar'])
+2
View File
@@ -2013,6 +2013,7 @@ importers:
'@types/ramda': 0.27.32
'@zkochan/rimraf': 1.0.0
execa: 4.1.0
is-windows: 1.0.2
mz: 2.7.0
write-yaml-file: 4.1.1
specifiers:
@@ -2032,6 +2033,7 @@ importers:
'@types/ramda': ^0.27.32
'@zkochan/rimraf': ^1.0.0
execa: ^4.1.0
is-windows: ^1.0.2
mz: ^2.7.0
p-limit: ^3.1.0
path-exists: ^4.0.0