From cd349944cfe0b075c7062a587bf7c908d9c4d0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sat, 14 Mar 2026 14:04:23 +0400 Subject: [PATCH 1/2] Update AGENTS.md with testing details --- AGENTS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6b39878..4007b05 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,8 +26,10 @@ It is written in TypeScript and compiled to a JavaScript module suitable for use - `dist/`: specific build artifacts. Do not edit files here directly. ## Testing -- Currently, no automated test suite is configured. -- `pnpm test` will exit with an error. +- **Framework:** `vitest` +- **Run tests:** `pnpm test` +- **Watch mode:** `pnpm run test:watch` +- **Location:** Tests are located in the `test/` directory. ## Contribution Guidelines - When adding new functionality, ensure proper types are exported in `src/types.d.ts` or within the module files. From b3fd092acfcc3c40349593f00a340d5251caa495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sat, 14 Mar 2026 14:12:52 +0400 Subject: [PATCH 2/2] Set up CI --- .gitea/workflows/test.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..3b7df48 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,17 @@ +name: Test +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 9 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + - run: pnpm install + - run: pnpm test