From 6d4f03650d7c98ec2c352125eb783d64f2e00f39 Mon Sep 17 00:00:00 2001 From: Timon Jurschitsch Date: Fri, 25 Nov 2022 12:12:00 +0100 Subject: [PATCH] Move location of --json flag --- test/prerequisite-tasks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/prerequisite-tasks.js b/test/prerequisite-tasks.js index a62cc7cc..fd49aa39 100644 --- a/test/prerequisite-tasks.js +++ b/test/prerequisite-tasks.js @@ -10,7 +10,7 @@ let testedModule; const testArgs = async () => { const npmVersion = await versionNpm(); - return semver.satisfies(npmVersion, '>=9.0.0') ? ['list collaborators', '--json'] : ['ls-collaborators', '']; + return semver.satisfies(npmVersion, '>=9.0.0') ? ['list collaborators', ' --json'] : ['ls-collaborators', '']; }; const run = async listr => { @@ -116,7 +116,7 @@ test.serial('should fail when user is not authenticated at npm registry', async stdout: 'sindresorhus' }, { - command: `npm access ${testArgs[0]} test ${testArgs[1]}`, + command: `npm access ${testArgs[0]} test${testArgs[1]}`, exitCode: 0, stdout: '{"sindresorhus": "read"}' } @@ -136,7 +136,7 @@ test.serial('should fail when user is not authenticated at external registry', a stdout: 'sindresorhus' }, { - command: `npm access ${testArgs[0]} test --registry http://my.io ${testArgs[1]}`, + command: `npm access ${testArgs[0]} test${testArgs[1]} --registry http://my.io`, exitCode: 0, stdout: '{"sindresorhus": "read"}' }