mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-19 14:20:36 -04:00
test: issue with passing properly args to the comannd
pnpm does not properly pass arguments to command that is specfied in the build script as npm does, with this commit pnpm passes arguments exaclty like npm. close #1124
This commit is contained in:
committed by
Zoltan Kochan
parent
5fa20dd6ac
commit
17845a481f
@@ -18,3 +18,15 @@ test('pnpm run: returns correct exit code', async (t: tape.Test) => {
|
||||
t.equal(execPnpmSync('run', 'exit0').status, 0)
|
||||
t.equal(execPnpmSync('run', 'exit1').status, 1)
|
||||
})
|
||||
|
||||
test('pass the args to the command that is specfied in the build script', async t => {
|
||||
prepare(t, {
|
||||
scripts: {
|
||||
test: 'ts-node test'
|
||||
},
|
||||
})
|
||||
|
||||
const result = execPnpmSync('run', 'test', '--', '--flag=true')
|
||||
|
||||
t.ok((result.stdout as Buffer).toString('utf8').match(/ts-node test "--flag=true"/), 'command was successful')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user