Skip to content

Commit 3a15c80

Browse files
committed
Update GitHub Copilot instructions with test details
- Add comprehensive unit test examples with yarn test-unit - Include integration test examples with yarn test-integration - Document test filtering by file path and wildcard patterns - Explain test runner frameworks (mocha and playwright)
1 parent e969832 commit 3a15c80

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

.github/copilot-instructions.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,43 @@ Please follow these guidelines when contributing:
66

77
- Install dependencies: `npm install && npm run setup`
88
- Build and bundle demo: `npm run build && npm run esbuild`
9-
- Run unit tests: `npm run test-unit`
10-
- Run playwright-based integration tests: `npm run test-integration`
9+
10+
## Unit tests
11+
12+
Unit tests are run with `yarn test-unit`:
13+
14+
```sh
15+
# All unit tests
16+
yarn test-unit
17+
18+
# Absolute file path
19+
yarn test-unit out-esbuild/browser/Terminal.test.js
20+
21+
# Filter by wildcard
22+
yarn test-unit out-esbuild/**/Terminal.test.js
23+
24+
# Specific addon unit tests tests
25+
yarn test-unit addons/addon-image/out-esbuild/*.test.js
26+
27+
# Multiple files
28+
yarn test-unit out-esbuild/**/Terminal.test.js out-esbuild/**/InputHandler.test.js
29+
```
30+
31+
These use mocha to run all `.test.js` files within the esbuild output (`out-esbuild/`).
32+
33+
## Integration tests
34+
35+
Integration tests are run with `yarn test-integration`:
36+
37+
```sh
38+
# All integration tests
39+
yarn test-integration
40+
41+
# Core integration tests
42+
yarn test-integration --suite=core
43+
44+
# Specific addon integration tests
45+
yarn test-integration --suite=addon-search
46+
```
47+
48+
These use `@playwright/test` to run all tests within the esbuild test output (`out-esbuild-test/`).

0 commit comments

Comments
 (0)