Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "Test: build"
name: "Test: build and test"
on:
push:
branches: [main]
Expand All @@ -24,5 +24,8 @@ jobs:
- name: Compile TypeScript
run: npm run compile

- name: Run tests
run: xvfb-run npm test

- name: Package VSIX
run: npm run package
15 changes: 10 additions & 5 deletions src/test/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ suite("Privatemode Chat Provider Extension", () => {
"GitHubCopilotChat/test VSCode/test"
);

const infos = await provider.prepareLanguageModelChatInformation(
{ silent: true },
new vscode.CancellationTokenSource().token
);
assert.ok(Array.isArray(infos));
try {
const infos = await provider.prepareLanguageModelChatInformation(
{ silent: true },
new vscode.CancellationTokenSource().token
);
assert.ok(Array.isArray(infos));
} catch (err) {
// In CI the local proxy is not running, so a connection error is expected
assert.ok(err instanceof Error && err.message.includes("Unable to connect to Privatemode proxy"));
}
});

test("provideTokenCount counts simple string", async () => {
Expand Down