Skip to content

Commit d28d030

Browse files
committed
Update more tests to use uid
1 parent f6526a9 commit d28d030

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/app/src/cli/services/dev/update-extension.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ vi.mock('../../models/app/loader.js', async () => {
3030

3131
const apiKey = 'mock-api-key'
3232
const registrationId = 'mock-registration-id'
33-
const handle = 'mock-handle'
3433
const stdout = {write: vi.fn()} as any
3534
const stderr = {write: vi.fn()} as any
3635

@@ -42,16 +41,17 @@ describe('updateExtensionDraft()', () => {
4241
runtime_context: 'strict',
4342
settings: {type: 'object'},
4443
type: 'web_pixel_extension',
45-
handle,
44+
handle: 'mock-handle',
4645
} as any
4746

4847
const mockExtension = await testUIExtension({
4948
devUUID: '1',
5049
configuration,
5150
directory: tmpDir,
51+
uid: 'uid1',
5252
})
5353

54-
await mkdir(joinPath(tmpDir, 'mock-handle', 'dist'))
54+
await mkdir(joinPath(tmpDir, 'uid1', 'dist'))
5555
const outputPath = mockExtension.getOutputPathForDirectory(tmpDir)
5656
await writeFile(outputPath, 'test content')
5757

@@ -69,7 +69,7 @@ describe('updateExtensionDraft()', () => {
6969
expect(developerPlatformClient.updateExtension).toHaveBeenCalledWith({
7070
apiKey,
7171
context: '',
72-
handle,
72+
handle: 'mock-handle',
7373
registrationId,
7474
config:
7575
'{"runtime_context":"strict","runtime_configuration_definition":{"type":"object"},"serialized_script":"dGVzdCBjb250ZW50"}',
@@ -259,9 +259,10 @@ describe('updateExtensionDraft()', () => {
259259
devUUID: '1',
260260
directory: tmpDir,
261261
type: 'web_pixel_extension',
262+
uid: 'uid1',
262263
})
263264

264-
await mkdir(joinPath(tmpDir, mockExtension.handle, 'dist'))
265+
await mkdir(joinPath(tmpDir, mockExtension.uid, 'dist'))
265266
const outputPath = mockExtension.getOutputPathForDirectory(tmpDir)
266267
await writeFile(outputPath, 'test content')
267268

0 commit comments

Comments
 (0)