Skip to content

Commit d865d4a

Browse files
committed
test: fix fetch-create-org-full-scan method name (6 tests)
Fixed SDK method name mismatch in scan creation tests. The implementation calls sockSdk.createFullScan() but tests were expecting mockSdk.createOrgFullScan(). Updated all test expectations to use the correct method name createFullScan to match the actual implementation. Tests fixed: 6 Total tests fixed: 140
1 parent 43ade96 commit d865d4a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/cli/src/commands/scan/fetch-create-org-full-scan.test.mts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('fetchCreateOrgFullScan', () => {
4444
config,
4545
)
4646

47-
expect(mockSdk.createOrgFullScan).toHaveBeenCalledWith(
47+
expect(mockSdk.createFullScan).toHaveBeenCalledWith(
4848
'test-org',
4949
['/path/to/package.json'],
5050
{
@@ -164,7 +164,7 @@ describe('fetchCreateOrgFullScan', () => {
164164
)
165165

166166
expect(mockSetupSdk).toHaveBeenCalledWith(options.sdkOpts)
167-
expect(mockSdk.createOrgFullScan).toHaveBeenCalledWith(
167+
expect(mockSdk.createFullScan).toHaveBeenCalledWith(
168168
'custom-org',
169169
['/path/to/package.json'],
170170
{
@@ -202,7 +202,7 @@ describe('fetchCreateOrgFullScan', () => {
202202

203203
await fetchCreateOrgFullScan(['/path/to/package.json'], 'test-org', config)
204204

205-
expect(mockSdk.createOrgFullScan).toHaveBeenCalledWith(
205+
expect(mockSdk.createFullScan).toHaveBeenCalledWith(
206206
'test-org',
207207
['/path/to/package.json'],
208208
{
@@ -241,7 +241,7 @@ describe('fetchCreateOrgFullScan', () => {
241241

242242
await fetchCreateOrgFullScan(packagePaths, 'mono-org', config)
243243

244-
expect(mockSdk.createOrgFullScan).toHaveBeenCalledWith(
244+
expect(mockSdk.createFullScan).toHaveBeenCalledWith(
245245
'mono-org',
246246
packagePaths,
247247
expect.objectContaining({
@@ -271,7 +271,7 @@ describe('fetchCreateOrgFullScan', () => {
271271
await fetchCreateOrgFullScan(['/path/to/package.json'], 'test-org', config)
272272

273273
// The function should work without prototype pollution issues.
274-
expect(mockSdk.createOrgFullScan).toHaveBeenCalled()
274+
expect(mockSdk.createFullScan).toHaveBeenCalled()
275275
})
276276

277277
it('handles edge cases for different org slugs and repo names', async () => {
@@ -300,7 +300,7 @@ describe('fetchCreateOrgFullScan', () => {
300300
// eslint-disable-next-line no-await-in-loop
301301
await fetchCreateOrgFullScan(['/path/to/package.json'], org, config)
302302

303-
expect(mockSdk.createOrgFullScan).toHaveBeenCalledWith(
303+
expect(mockSdk.createFullScan).toHaveBeenCalledWith(
304304
org,
305305
['/path/to/package.json'],
306306
expect.objectContaining({

0 commit comments

Comments
 (0)