diigo-cache: own test toolchain; pnpm lint, pnpm test
vitest, @cloudflare/vitest-plugin, and typescript are devDependencies here instead of being borrowed from diigo-bookmarks through hand-made node_modules symlinks and a deep-path import. - lint: wrangler types, then tsc over src/ and tests/ (Cloudflare's documented typecheck shape: regenerate types, then tsc) - test: vitest run - tests/tsconfig.json per the vitest-plugin docs; the dangling typecheck script (tsconfig.check.json never existed) is gone Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
22ae9a2b61
commit
0cfa9d204e
4 files changed
+21
-12
No files matched your search
@@ -85,12 +85,13 @@ const ndjson = await env.DIIGO.dumpNdjson(4, 24);
|
||||
|
||||
## Test
|
||||
|
||||
pnpm test
|
||||
pnpm types # regenerate worker-configuration.d.ts (after wrangler.jsonc changes)
|
||||
pnpm lint # fails if those types are stale; tsc over src/ and tests/
|
||||
pnpm test # vitest
|
||||
|
||||
Runs the real worker and both DOs in the vitest pool, with `WEBAPP`
|
||||
bound to [a fake webapp](tests/fake-webapp.js) serving diigo-shaped
|
||||
items (`wrangler.tests.jsonc`). vitest is borrowed from
|
||||
`../diigo-bookmarks/node_modules` (see `vitest.config.ts`).
|
||||
Tests run the real worker and both DOs in the vitest pool, with
|
||||
`WEBAPP` bound to [a fake webapp](tests/fake-webapp.js) serving
|
||||
diigo-shaped items (`wrangler.tests.jsonc`).
|
||||
|
||||
## Run, deploy
|
||||
|
||||
|
||||
Reference in new issue
Block a user