Skip to content

Commit e314c7d

Browse files
committed
Fix mock path imports in spec and fetch-report-data tests
- spec.test.mts: Update mock path from './purl.mts' to '../purl/parse.mts' to match actual import location - fetch-report-data.test.mts: Add mock for @socketsecurity/lib/constants/process getSpinner function
1 parent 00149a0 commit e314c7d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/cli/src/commands/scan/fetch-report-data.test.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ vi.mock('@socketsecurity/lib/logger', () => ({
2525
},
2626
}))
2727

28+
vi.mock('@socketsecurity/lib/constants/process', () => ({
29+
getSpinner: vi.fn(() => ({
30+
start: vi.fn(),
31+
stop: vi.fn(),
32+
})),
33+
}))
34+
2835
vi.mock('../../constants.mts', () => {
2936
const kInternalsSymbol = Symbol.for('kInternalsSymbol')
3037
const mockConstants = {

packages/cli/src/utils/npm/spec.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vi.mock('npm-package-arg', () => ({
1414
default: vi.fn(),
1515
}))
1616

17-
vi.mock('./purl.mts', () => ({
17+
vi.mock('../purl/parse.mts', () => ({
1818
createPurlObject: vi.fn(),
1919
}))
2020

0 commit comments

Comments
 (0)