Skip to content

Commit b53e033

Browse files
committed
Does this work?
1 parent 59b27ca commit b53e033

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/socket-npm.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const spawn = require('@npmcli/promise-spawn')
88

99
const constants = require('../dist/constants.js')
1010

11-
const { NODE_MODULES, NPM, abortSignal } = constants
11+
const abortSignal = new AbortController().signal
12+
13+
const { NODE_MODULES, NPM } = constants
1214

1315
const testPath = __dirname
1416
const npmFixturesPath = path.join(testPath, 'socket-npm-fixtures')
@@ -19,7 +21,9 @@ for (const npmDir of versions) {
1921
const npmPath = path.join(npmFixturesPath, npmDir)
2022
const npmBinPath = path.join(npmPath, NODE_MODULES, '.bin')
2123

22-
console.log(`Running \`npm install --silent\` for ${npmDir} in ${process.version}`)
24+
console.log(
25+
`Running \`npm install --silent\` for ${npmDir} in ${process.version}`
26+
)
2327
spawnSync(NPM, ['install', '--silent'], {
2428
cwd: npmPath,
2529
signal: abortSignal,

0 commit comments

Comments
 (0)