Make agent instructions harness agnostic
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
---
|
---
|
||||||
applyTo: '**/*.benchmark.ts'
|
name: benchmark
|
||||||
|
description: Run and author benchmark tests in xterm.js. Use when editing benchmark files, working in `*.benchmark.ts`, or when asked how to run the full benchmark suite, a single benchmark file, or a single benchmark case.
|
||||||
---
|
---
|
||||||
# Benchmark run instructions
|
|
||||||
|
# Benchmark Run Instructions
|
||||||
|
|
||||||
|
## Running Benchmarks
|
||||||
|
|
||||||
- Full suite: `npm run benchmark`
|
- Full suite: `npm run benchmark`
|
||||||
- Single benchmark file:
|
- Single benchmark file:
|
||||||
@@ -11,8 +15,14 @@ applyTo: '**/*.benchmark.ts'
|
|||||||
- Use `-t` to get the path, then:
|
- Use `-t` to get the path, then:
|
||||||
- `npm run benchmark -- -s "<path>" out-test/benchmark/Event.benchmark.js`
|
- `npm run benchmark -- -s "<path>" out-test/benchmark/Event.benchmark.js`
|
||||||
|
|
||||||
When writing instructions, use `RuntimeCase` to measure pure runtime in ms, use `ThroughputRuntimeCase` when measuring throughput in MB/s.
|
## Benchmark Case Selection
|
||||||
|
|
||||||
|
When writing benchmark instructions:
|
||||||
|
|
||||||
|
- Use `RuntimeCase` to measure pure runtime in ms.
|
||||||
|
- Use `ThroughputRuntimeCase` when measuring throughput in MB/s.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
Notes:
|
|
||||||
- Benchmarks run from built JS in `out-test/benchmark/*.benchmark.js`.
|
- Benchmarks run from built JS in `out-test/benchmark/*.benchmark.js`.
|
||||||
- Keep `NODE_PATH=./out` (handled by the npm script).
|
- Keep `NODE_PATH=./out` (handled by the npm script).
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
---
|
---
|
||||||
applyTo: '**/*.test.ts'
|
name: unit-test
|
||||||
|
description: Write and review xterm.js unit tests with project conventions. Use when editing `*.test.ts` files or when asked for test authoring guidelines.
|
||||||
---
|
---
|
||||||
When writing unit tests follow these rules:
|
|
||||||
|
# Unit Test Instructions
|
||||||
|
|
||||||
|
When writing unit tests, follow these rules:
|
||||||
|
|
||||||
- When writing unit tests for addons, always create a real xterm.js instance instead of mocking it.
|
- When writing unit tests for addons, always create a real xterm.js instance instead of mocking it.
|
||||||
- Prefer `assert.ok` over `assert.notStrictEqual` when checking something is undefined or not.
|
- Prefer `assert.ok` over `assert.notStrictEqual` when checking something is undefined or not.
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"hooks": {
|
|
||||||
"SessionStart": [
|
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"command": "npm run agent:setup-repo"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-2
@@ -29,6 +29,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"presetup": "npm run build",
|
"presetup": "npm run build",
|
||||||
"setup": "npm run esbuild",
|
"setup": "npm run esbuild",
|
||||||
|
"setup-full": "node bin/setup-full.mjs",
|
||||||
"postsetup": "npm run esbuild-demo-server",
|
"postsetup": "npm run esbuild-demo-server",
|
||||||
"start": "node demo/start",
|
"start": "node demo/start",
|
||||||
"dev": "concurrently -k -p [{name}] -n tsc,esbuild,esbuild-demo-client,esbuild-demo-server,server -c blue,yellow,cyan,green,magenta \"npm:tsc-watch\" \"npm:esbuild-watch\" \"npm:esbuild-demo-client-watch\" \"npm:esbuild-demo-server-watch\" \"npm:start\"",
|
"dev": "concurrently -k -p [{name}] -n tsc,esbuild,esbuild-demo-client,esbuild-demo-server,server -c blue,yellow,cyan,green,magenta \"npm:tsc-watch\" \"npm:esbuild-watch\" \"npm:esbuild-demo-client-watch\" \"npm:esbuild-demo-server-watch\" \"npm:start\"",
|
||||||
@@ -72,8 +73,7 @@
|
|||||||
"prepackage-headless": "npm run esbuild-package-headless-only",
|
"prepackage-headless": "npm run esbuild-package-headless-only",
|
||||||
"package-headless": "webpack --config ./webpack.config.headless.js",
|
"package-headless": "webpack --config ./webpack.config.headless.js",
|
||||||
"postpackage-headless": "node ./bin/package_headless.js",
|
"postpackage-headless": "node ./bin/package_headless.js",
|
||||||
"prepublishOnly": "npm run package",
|
"prepublishOnly": "npm run package"
|
||||||
"agent:setup-repo": "node bin/agent/setup-repo.mjs"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@lunapaint/png-codec": "^0.2.0",
|
"@lunapaint/png-codec": "^0.2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user