-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Parent issue: #90
Overview
Set up the foundational test infrastructure before writing individual tests.
Tasks
- Add devDependencies:
jsdom,nyc,@vscode/test-electron - Create directory structure:
test/ ├── unit/ ├── extension/ ├── webview/ ├── mocks/ └── fixtures/ - Create
test/mocks/vscode.tswith factories:createMockWorkspaceFolder(path)createMockTextEditor(uri, selection?)createMockExtensionContext()
- Create
test/fixtures/with sample.weauditfiles (valid, corrupt, empty, legacy) - Add npm scripts to
package.json:"test": "npm run test:unit && npm run test:ext", "test:unit": "mocha -r ts-node/register test/unit/**/*.test.ts", "test:ext": "vscode-test", "coverage": "nyc npm run test:unit"
- Configure nyc coverage thresholds (80% types.ts, 60% overall)
Acceptance Criteria
npm run test:unitexecutes successfully- Mock factories importable in tests
- Fixtures available for subsequent test issues
Reference
See TESTING.md
Metadata
Metadata
Assignees
Labels
testingTest-related issuesTest-related issues