File tree Expand file tree Collapse file tree
frontend/src/core/codemirror/lsp/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { cellId } from "@/__tests__/branded";
1212import type { CellId } from "@/core/cells/ids" ;
1313import { store } from "@/core/state/jotai" ;
1414import { topologicalCodesAtom } from "../../copilot/getCodes" ;
15+ import { lspWorkspaceAtom } from "@/core/saving/file-state" ;
1516import { languageAdapterState } from "../../language/extension" ;
1617import { PythonLanguageAdapter } from "../../language/languages/python" ;
1718import { languageMetadataField } from "../../language/metadata" ;
@@ -285,6 +286,12 @@ describe("NotebookLanguageServerClient", () => {
285286 } ,
286287 } ;
287288 }
289+ if ( atom === lspWorkspaceAtom ) {
290+ return {
291+ rootUri : "file:///project" ,
292+ documentUri : "file:///project/__marimo_notebook__.py" ,
293+ } ;
294+ }
288295 return undefined ;
289296 } ) ;
290297
@@ -421,7 +428,7 @@ describe("NotebookLanguageServerClient", () => {
421428 expect ( result ) . toEqual ( mockCompletionResponse ) ;
422429 expect ( mockClient . textDocumentCompletion ) . toHaveBeenCalledWith (
423430 expect . objectContaining ( {
424- textDocument : { uri : "file:///__marimo_notebook__.py" } ,
431+ textDocument : { uri : "file:///project/ __marimo_notebook__.py" } ,
425432 } ) ,
426433 ) ;
427434 } ) ;
You can’t perform that action at this time.
0 commit comments