Skip to content

Commit 6ab0fec

Browse files
committed
Fix tests
1 parent d75ea01 commit 6ab0fec

13 files changed

Lines changed: 596 additions & 372 deletions

.config/rollup.base.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const {
3535
INLINED_SOCKET_CLI_VERSION_HASH,
3636
NODE_MODULES,
3737
ROLLUP_EXTERNAL_SUFFIX,
38+
UTF8,
3839
VITEST,
3940
} = constants
4041

@@ -68,7 +69,7 @@ function getSocketCliVersionHash() {
6869
try {
6970
gitHash = stripAnsi(
7071
spawnSync('git', ['rev-parse', '--short', 'HEAD'], {
71-
encoding: 'utf8',
72+
encoding: UTF8,
7273
}).stdout.trim(),
7374
)
7475
} catch {}

src/commands/npm/socket-npm-integration.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest'
44

55
import { isDebug } from '@socketsecurity/registry/lib/debug'
66
import { logger } from '@socketsecurity/registry/lib/logger'
7-
import { spawn, spawnSync } from '@socketsecurity/registry/lib/spawn'
7+
import { spawn } from '@socketsecurity/registry/lib/spawn'
88

99
import { testPath } from '../../../test/utils.mts'
1010
import constants, {
@@ -50,7 +50,7 @@ if (!npmDirs.length) {
5050
},
5151
async () => {
5252
// Ensure npm is installed in the fixture.
53-
spawnSync('npm', ['install', ...(useDebug ? [] : [FLAG_SILENT])], {
53+
await spawn('npm', ['install', ...(useDebug ? [] : [FLAG_SILENT])], {
5454
cwd: npmPath,
5555
stdio: useDebug ? 'inherit' : 'ignore',
5656
})

0 commit comments

Comments
 (0)