Skip to content

The agent that grows with you

test(desktop): import the SDK statically in the workspace-reveal spec

teknium11abc58adc4c5
diff --git a/apps/desktop/src/app/routes.workspace-reveal.test.ts b/apps/desktop/src/app/routes.workspace-reveal.test.ts
index 1945352eb00..3af32126802 100644
--- a/apps/desktop/src/app/routes.workspace-reveal.test.ts
+++ b/apps/desktop/src/app/routes.workspace-reveal.test.ts
@@ -12,6 +12,7 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { registry } from '@/contrib/registry'
+import { host } from '@/sdk'
import {
$workspaceIsPage,
@@ -195,12 +196,10 @@ describe('navigateToWorkspacePage', () => {
* like the sidebar does.
*/
describe('host.navigate', () => {
- it('fronts the workspace pane even when already on the contributed page', async () => {
+ it('fronts the workspace pane even when already on the contributed page', () => {
const dispose = contributeRoute()
try {
- const { host } = await import('@/sdk')
-
window.location.hash = `#${CONTRIBUTED_ROUTE}`
vi.mocked(revealTreePane).mockClear()
vi.mocked(noteActiveTreeGroup).mockClear()
@@ -214,9 +213,7 @@ describe('host.navigate', () => {
}
})
- it('does not front the pane for a chat route', async () => {
- const { host } = await import('@/sdk')
-
+ it('does not front the pane for a chat route', () => {
host.navigate(sessionRoute('sess-a'))
expect(revealTreePane).not.toHaveBeenCalled()