agentsclimarketplace

Run integration tests

Skill mahmoud20138/Tradecraft/plugins/tradecraft/skills/run-integration-tests

Run integration tests to verify that extension components work together correctly. Use this after modifying component interactions or event handling.From its SKILL.md

Install
npx -y skills add mahmoud20138/Tradecraft --skill run-integration-tests

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 10 stars10 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.4 KB, 780 tokens by cl100k_base, as published. Nobody here has run it

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

ActionCommand
Run all integration testsnpm run compile && npm run compile-tests && npm run integration-test
Run specific testnpm run integration-test -- --grep "manager"
Debug in VS CodeDebug 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-test

Step 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

ErrorCauseFix
API not availableExtension activation failedCheck Debug Console
Event not firedEvent wiring issueCheck event registration
State mismatchComponents out of syncAdd logging, check update paths
TimeoutAsync operation stuckCheck 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

FilePurpose
src/test/integration/envManagerApi.integration.test.tsManager + API tests
src/test/integration/index.tsTest runner entry point
src/test/testUtils.tsUtilities (waitForCondition, TestEventHandler)

Prerequisites

  • CI needs webpack build - Run npm run compile (webpack) before tests, not just npm run compile-tests (tsc)
  • Extension builds - Run npm run compile before 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/)

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.