From 34137b371ec9184ae60c231d5616f4b0a67a67b3 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 6 Mar 2024 14:00:56 -0800 Subject: [PATCH] fixup: fix test --- test/bin/windows-shims.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/bin/windows-shims.js b/test/bin/windows-shims.js index 5baac1af7a753..2abe5013bf10b 100644 --- a/test/bin/windows-shims.js +++ b/test/bin/windows-shims.js @@ -94,14 +94,12 @@ t.test('run shims', t => { node_modules: { npm: { bin: { - 'npm-prefix.js': readFileSync(join(BIN, 'npm-prefix.js')), - 'npx-cli.js': `throw new Error('this should not be called')`, - 'npm-cli.js': ` - const assert = require('assert') + 'npm-prefix.js': ` const { resolve } = require('path') - assert.equal(process.argv.slice(2).join(' '), 'prefix -g') console.log(resolve(__dirname, '../../../global-prefix')) `, + 'npx-cli.js': `throw new Error('local npx should not be called')`, + 'npm-cli.js': `throw new Error('local npm should not be called')`, }, }, },