File tree Expand file tree Collapse file tree 4 files changed +32
-28
lines changed
Expand file tree Collapse file tree 4 files changed +32
-28
lines changed Original file line number Diff line number Diff line change 14141414 "dev" : " yarn run build dev" ,
14151415 "lint" : " eslint src --ext ts" ,
14161416 "build-lang" : " node syntaxes/build-lang" ,
1417- "test-build" : " yarn run build test" ,
1418- "test" : " vscode-test"
1417+ "test" : " yarn run build test && vscode-test"
14191418 },
14201419 "dependencies" : {
14211420 "axios" : " ^1.2.1" ,
Original file line number Diff line number Diff line change 1+ import * as vscode from "vscode" ;
2+ import * as assert from "assert" ;
3+ import { exampleWorkspacePath } from "./test-utils" ;
4+ import { isQuartoDoc } from "../core/doc" ;
5+
6+ suite ( "Quarto basics" , ( ) => {
7+ test ( "Can open a Quarto document" , async ( ) => {
8+ const doc = await vscode . workspace . openTextDocument ( exampleWorkspacePath ( "hello.qmd" ) ) ;
9+ const editor = await vscode . window . showTextDocument ( doc ) ;
10+ assert . strictEqual ( editor ?. document . languageId , "quarto" ) ;
11+ assert . strictEqual ( isQuartoDoc ( editor ?. document ) , true ) ;
12+ } ) ;
13+ } ) ;
Original file line number Diff line number Diff line change 1+ import * as path from "path" ;
2+
3+
4+ /**
5+ * Path to the root directory of the extension:
6+ * https://github.com/microsoft/vscode-python-tools-extension-template/blob/main/src/common/constants.ts
7+ */
8+ export const EXTENSION_ROOT_DIR =
9+ path . basename ( __dirname ) === "common"
10+ ? path . dirname ( path . dirname ( __dirname ) )
11+ : path . dirname ( __dirname ) ;
12+
13+ export const TEST_PATH = path . join ( EXTENSION_ROOT_DIR , "src" , "test" ) ;
14+ export const WORKSPACE_PATH = path . join ( TEST_PATH , "examples" ) ;
15+
16+ export function exampleWorkspacePath ( file : string ) : string {
17+ return path . join ( WORKSPACE_PATH , file ) ;
18+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments