Skip to content

Commit 43b13f4

Browse files
committed
debug ci
1 parent 7901107 commit 43b13f4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/suite/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as path from "path";
44

55
import Mocha from "mocha";
66
import glob from "glob";
7+
import Parser from "tree-sitter";
78

89
export async function run(): Promise<void> {
910
// Create the mocha test
@@ -33,12 +34,20 @@ export async function run(): Promise<void> {
3334
// create parsers dir
3435
await fs.mkdir(parsersDir);
3536

37+
const testParser = new Parser();
38+
3639
// install tree-sitter-rust
3740
let result = await Installer.getLanguage("test-parsers", "rust", true);
3841
if (result.status === "err") {
3942
throw new Error(`Failed to install language: ${result.result}`);
4043
}
4144

45+
try {
46+
testParser.setLanguage(result.result);
47+
} catch (error) {
48+
throw new Error(`Failed to install language: ${result.result}`);
49+
}
50+
4251
console.log(`Installed language: ${JSON.stringify(result.result)}`);
4352

4453
// install tree-sitter-typescript
@@ -47,6 +56,12 @@ export async function run(): Promise<void> {
4756
throw new Error(`Failed to install language: ${result.result}`);
4857
}
4958

59+
try {
60+
testParser.setLanguage(result.result);
61+
} catch (error) {
62+
throw new Error(`Failed to install language: ${result.result}`);
63+
}
64+
5065
console.log(`Installed language: ${JSON.stringify(result.result)}`);
5166

5267
return new Promise((c, e) => {

0 commit comments

Comments
 (0)