Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ jobs:
# asserts activate/deactivate are exported.
run: npm run smoke

- name: Integration tests (real VS Code)
# @vscode/test-electron boots a real extension host and runs
# the mocha suite under src/test/integration/. Verifies the
# activation / command / view contracts that unit tests can
# only approximate. Linux-only — VS Code needs an X server
# (xvfb-run) on headless runners; Windows/macOS in this
# matrix already exercise the platform-specific paths via the
# unit suite + bundle smoke.
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a npm run test:integration

- name: npm audit (prod deps, high+)
# Network-bound and platform-independent; one run is enough.
if: matrix.os == 'ubuntu-latest'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ web_modules/
# Next.js build output
.next
out
out-test

# Nuxt.js build / generate output
.nuxt
Expand Down
25 changes: 25 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Configuration for `@vscode/test-cli`, which boots a real VS Code
// extension host so we can verify the contracts that unit tests can
// only approximate: that activation actually fires, commands really
// register, the view appears in the activity bar. The compiled tests
// live in `out-test/` (separate from the esbuild bundle in `dist/`)
// and use mocha-bdd-ui — same convention every official VS Code
// extension uses.

import { defineConfig } from "@vscode/test-cli";

export default defineConfig({
// Compiled test files; `tsconfig.integration.json` emits them.
files: "out-test/test/integration/**/*.test.js",
// Open the deliberately-vulnerable sample workflow as the workspace
// root so activation events fire (workspaceContains:**/.github/workflows/*).
workspaceFolder: "test-fixtures/sample-workflow",
// Tests need the extension's commands and views registered before
// they run; without a sane timeout, mocha may fail before the
// extension finishes activating in slow CI environments.
mocha: {
ui: "bdd",
timeout: 20000,
color: true,
},
});
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ test-fixtures/**
scripts/**
docs/**
out/**
out-test/**
ROADMAP.md
.gitignore
.eslintrc.json
.vscode-test.mjs
tsconfig.json
tsconfig.integration.json
vitest.config.ts
**/*.map
**/*.ts
**/tsconfig.json
Expand Down
Loading