Skip to content

Commit 3ab6cbb

Browse files
Add wokrspaceId override test
1 parent 2bfe433 commit 3ab6cbb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/seam/connect/env.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,23 @@ test.serial(
315315
env['SEAM_WORKSPACE_ID'] = seed.seed_workspace_1
316316
const seam = new SeamHttp({
317317
personalAccessToken: seed.seam_at1_token,
318+
endpoint,
319+
})
320+
const device = await seam.devices.get({
321+
device_id: seed.august_device_1,
322+
})
323+
t.is(device.workspace_id, seed.seed_workspace_1)
324+
t.is(device.device_id, seed.august_device_1)
325+
},
326+
)
327+
328+
test.serial(
329+
'SeamHttp: workspaceId option overrides environment variables',
330+
async (t) => {
331+
const { seed, endpoint } = await getTestServer(t)
332+
env['SEAM_PERSONAL_ACCESS_TOKEN'] = seed.seam_at1_token
333+
env['SEAM_WORKSPACE_ID'] = 'some-invalid-workspace'
334+
const seam = new SeamHttp({
318335
workspaceId: seed.seed_workspace_1,
319336
endpoint,
320337
})

0 commit comments

Comments
 (0)