test
Use when asked to run or verify tests in this repository. Run one test when a file path is supplied, or the package test suites when no path is supplied.
- License 许可
- MPL-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- test
- description
- Use when asked to run or verify tests in this repository. Run one test when a file path is supplied, or the package test suites when no path is supplied.
02 资源文件 1
- 参考文档agents/openai.yaml180 B
03 SKILL.md 正文
Run tests via Turbo or per-package.
Every package uses Vitest, but in different modes — check which package the path belongs to, and its file name, before choosing a command.
Read the owning package.json and test configuration before choosing a command;
they are authoritative if the table changes.
| Package | Runner | Test files |
|---|---|---|
packages/core |
vitest --mode=node (unit), --mode=integration (database) |
*.test.node.ts; integration tests in src/**/tests/*.test.ts |
packages/lms-canvas |
vitest --mode=node |
*.test.node.ts |
packages/lti |
none | no tests |
packages/host-tanstack-start, apps/gradebook, apps/agent |
vitest (jsdom and node) | *.test.ts(x) for jsdom; *.test.node.ts(x) for node |
Single file
If the request includes a file path, run just that file from the owning package:
packages/core—pnpm -F @modulus-learning/core test:one <path>for a*.test.node.tsfile;test:integration:one <path>for a file undersrc/**/tests/.packages/lms-canvas—pnpm -F @modulus-learning/lms-canvas exec vitest run --mode=node <path>.- Host, gradebook, or agent —
pnpm -F <package-name> exec vitest run --mode=jsdom <path>. Use--mode=nodefor a*.test.node.ts(x)file.
Paths are relative to the owning package. Unit runs do not load .env. Core's
integration mode loads .env.test in its global and per-file setup, preserves
CI-provided environment variables, and refuses databases without the _test
suffix.
Always use vitest run for a one-shot run — a bare vitest starts watch mode.
Everything
If no file path is supplied, run pnpm test from the root (turbo run test).
All workspace Vitest test scripts use vitest run. Packages with browser
code execute both the jsdom and node modes; core and the Canvas adapter run
node only.
pnpm test does not cover core integration tests, gradebook HTTP suites,
or packed installations:
pnpm test:integrationneeds PostgreSQL 18 andpackages/core/.env.test(copy.env.test.exampleand initialise the test database as indocs/22-testing.md).pnpm test:sessionbuilds the gradebook and runs its session HTTP suite against the_testdatabase.pnpm -F @modulus-learning/gradebook test:contracttests a server you start; configureCONTRACT_BASE_URLandCONTRACT_MODE.pnpm run ciruns the main CI job, including integration, session, and package checks. GitHub also runspnpm test:packedwithFIXTURE_DATABASE_URLset to a fresh, empty*_testdatabase. Run both to reproduce all hosted CI coverage.pnpm test:release(also part ofpnpm run ci) checks publishing guards and SQL immutability in temporary repositories with mocked npm/pnpm commands; it never publishes to npm or contacts GitHub.
Report results clearly: pass/fail counts and any failure details.
04 同仓库更多 Skills
writing-docs
Use when creating, rewriting, tightening, or reviewing any Modulus documentation — the documents under docs/ (introduction, architecture, core composition, data model, authn/authz, LTI, agent, deployment, security and privacy) and any per-package design notes. Trigger whenever the user asks to write, draft, improve, or review a doc; add a setup or getting-started section; document a subsystem, package, or API; or turn design notes into reference. Also use whenever a new subsystem ships and needs documenting, or a Planned document in 00-documentation-plan.md is being written. This skill encodes Modulus's documentation standard — doc-type selection, required structure, definition-before-use, runnable code examples, and house voice — so new and revised docs match the existing set rather than drifting from it.
github-pr
Open or update a GitHub pull request for the current branch — use when asked to create a PR, open a pull request, submit work for review, or push and PR. Handles branch naming, issue linking, and the PR description. Accepts an optional issue number or title hint as an argument.
git-commit
Create a git commit in this repository using the project's conventional commit format. Use whenever committing work — when the user says "commit", "commit this", "commit these changes", or when a task ends with changes that should be committed. Accepts an optional message hint as an argument.
writing-docs
Use when creating, rewriting, tightening, or reviewing any Modulus documentation — the documents under docs/ (introduction, architecture, core composition, data model, authn/authz, LTI, agent, deployment, security and privacy) and any per-package design notes. Trigger whenever the user asks to write, draft, improve, or review a doc; add a setup or getting-started section; document a subsystem, package, or API; or turn design notes into reference. Also use whenever a new subsystem ships and needs documenting, or a Planned document in 00-documentation-plan.md is being written. This skill encodes Modulus's documentation standard — doc-type selection, required structure, definition-before-use, runnable code examples, and house voice — so new and revised docs match the existing set rather than drifting from it.
typecheck
Use when asked to typecheck, check TypeScript, or verify type safety across the monorepo.
release
Use when asked to release or publish the @modulus-learning/* packages. Runs the lockstep changeset, versioning, gates, lint, release commit, npm publish and per-package tags, stable main sync, and umbrella GitHub release. Accepts patch, minor, major, or resume with a version and release commit.