Skip to content

Commit 913d45c

Browse files
committed
fix(test): use valid ReachabilityOptions in handle-scan-reach test
Replace invalid `{ depth: 5 }` with proper ReachabilityOptions object containing all required properties: - reachAnalysisTimeout - reachAnalysisMemoryLimit - reachDisableAnalytics - reachEcosystems - reachExcludePaths - reachMinSeverity - reachSkipCache - reachUseUnreachableFromPrecomputation Fixes TypeScript error: "Object literal may only specify known properties, and 'depth' does not exist in type 'ReachabilityOptions'"
1 parent 6940d39 commit 913d45c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

packages/cli/test/unit/commands/scan/handle-scan-reach.test.mts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@ describe('handleScanReach', () => {
118118
interactive: false,
119119
orgSlug: 'test-org',
120120
outputKind: 'json',
121-
reachabilityOptions: { depth: 5 },
121+
reachabilityOptions: {
122+
reachAnalysisTimeout: 300,
123+
reachAnalysisMemoryLimit: 2048,
124+
reachDisableAnalytics: false,
125+
reachEcosystems: [],
126+
reachExcludePaths: [],
127+
reachMinSeverity: 'low',
128+
reachSkipCache: false,
129+
reachUseUnreachableFromPrecomputation: false,
130+
},
122131
targets: ['src'],
123132
})
124133

@@ -127,7 +136,16 @@ describe('handleScanReach', () => {
127136
orgSlug: 'test-org',
128137
outputPath: undefined,
129138
packagePaths: ['/project/package.json', '/project/package-lock.json'],
130-
reachabilityOptions: { depth: 5 },
139+
reachabilityOptions: {
140+
reachAnalysisTimeout: 300,
141+
reachAnalysisMemoryLimit: 2048,
142+
reachDisableAnalytics: false,
143+
reachEcosystems: [],
144+
reachExcludePaths: [],
145+
reachMinSeverity: 'low',
146+
reachSkipCache: false,
147+
reachUseUnreachableFromPrecomputation: false,
148+
},
131149
spinner: expect.any(Object),
132150
target: 'src',
133151
uploadManifests: true,

0 commit comments

Comments
 (0)