You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,15 @@ This repository contains the public scripts for Simple Analytics. When making ch
6
6
7
7
- Use **Node.js 22.16** (see `.nvmrc`).
8
8
- Run `npm run build` to compile the scripts. This generates the files in `dist/` which should be committed.
9
-
- Format code with Prettier before committing. You can run `npx prettier -w .`.
10
-
- Execute `npm run test:unit` to run the unit tests.
9
+
- Format code with Prettier before committing. You can run `npx prettier -w .` or validate with `npm run prettier`.
10
+
11
+
## Testing
12
+
13
+
- Execute `npm run test:unit` to run the unit tests
14
+
- When adding a new feature or fixing a bug, please add a test.
15
+
- For every change, run `npm run build` to ensure the test uses the latest compiled version.
16
+
- Ignore most files in the `dist/` directory when checking for diffs, just check `dist/latest/latest.dev.js` and `dist/latest/auto-events.js` (whichever is relevant).
17
+
- Only tests in `test/unit/` are relevant for the AI and agents (it can run without internet access).
0 commit comments