run-integration-tests
Skill141 starsChanged 10 months agoMITView on GitHub
Run integration tests to verify that extension components work together correctly. Use this after modifying component interactions or event handling.
In this repository8 other files it gives its agents.
- cross-platform-pathsSkill
- debug-failing-testSkill
- generate-snapshotSkill
- python-manager-discoverySkill
- run-e2e-testsSkill
- run-pre-commit-checksSkill
- run-smoke-testsSkill
- settings-precedenceSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Run integration tests to verify that multiple components (managers, API, settings) work together correctly.
- Distinctive: line 10
After modifying how components communicate (events, state sharing)
- Distinctive: line 11
After changing the API surface
- Distinctive: line 12
After modifying managers or their interactions
- Distinctive: line 13
When components seem out of sync (UI shows stale data, events not firing)
- Distinctive: line 28
Do events fire when state changes?
- Distinctive: line 29
Do different scopes return appropriate data?
- Distinctive: line 54
Fail: Check error message and see Debugging section.
- Very specific: line 69
Create files in src/test/integration/ with pattern *.integration.test.ts:
- Very specific: line 105
CI needs webpack build: - Run npm run compile (webpack) before tests, not just npm run compile-tests (tsc)
- Very specific: line 106
Extension builds: - Run npm run compile before tests
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run integration tests to verify that multiple components (managers, API, settings) work together correctly.
When to Use This Skill
- After modifying how components communicate (events, state sharing)
- After changing the API surface
- After modifying managers or their interactions
- When components seem out of sync (UI shows stale data, events not firing)
Quick Reference
| Action | Command |
| Run all integration tests | npm run compile && npm run compile-tests && npm run integration-test |
| Run specific test | npm run integration-test -- --grep "manager" |
| Debug in VS Code | Debug panel → "Integration Tests" → F5 |
How Integration Tests Work
Integration tests run in a real VS Code instance but focus on component interactions:
- Does the API reflect manager state?
- Do events fire when state changes?
- Do different scopes return appropriate data?
They're faster than E2E (which test full workflows) but more thorough than smoke tests.
Workflow
Step 1: Compile and Run
npm run compile && npm run compile-tests && npm run integration-testStep 2: Interpret Results
Pass:
Integration: Environment Manager + API
✓ API reflects manager state after refresh
✓ Different scopes return appropriate environments
✓ Environment objects have consistent structure
3 passing (25s)Fail: Check error message and see Debugging section.
Debugging Failures
| Error | Cause | Fix |
API not available | Extension activation failed | Check Debug Console |
Event not fired | Event wiring issue | Check event registration |
State mismatch | Components out of sync | Add logging, check update paths |
Timeout | Async operation stuck | Check for deadlocks |
For detailed debugging: Debug panel → "Integration Tests" → F5
Adding New Integration Tests
Create files in src/test/integration/ with pattern *.integration.test.ts:
import * as assert from 'assert';
import * as vscode from 'vscode';
import { waitForCondition, TestEventHandler } from '../testUtils';
import { ENVS_EXTENSION_ID } from '../constants';
suite('Integration: [Component A] + [Component B]', function () {
this.timeout(120_000);
let api: ExtensionApi;
suiteSetup(async function () {
const extension = vscode.extensions.getExtension(ENVS_EXTENSION_ID);
assert.ok(extension, 'Extension not found');
if (!extension.isActive) await extension.activate();
api = extension.exports;
});
test('[Interaction test]', async function () {
// Test component interaction
});
});Test Files
| File | Purpose |
src/test/integration/envManagerApi.integration.test.ts | Manager + API tests |
src/test/integration/index.ts | Test runner entry point |
src/test/testUtils.ts | Utilities (waitForCondition, TestEventHandler) |
Prerequisites
- CI needs webpack build - Run
npm run compile(webpack) before tests, not justnpm run compile-tests(tsc) - Extension builds - Run
npm run compilebefore tests
Notes
- Integration tests are faster than E2E (30s-2min vs 1-3min)
- Focus on testing component boundaries, not full user workflows
- First run downloads VS Code (~100MB, cached in
.vscode-test/)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

