mirror of
https://github.com/Twigpine/openlaunch.git
synced 2026-11-10 05:01:52 -10:00
Adds editServer.test.ts with 8 tests covering: RPC error returns 503 with nonce intact, invalid signature returns 401 with nonce intact, valid signature consumes nonce and writes metadata, already-used nonce rejected, rate-limit DoS mechanism, cross-wallet isolation, 10 invalid-sig requests do not freeze the wallet, non-creator nonce requests do not spend the wallet bucket. Test infrastructure: tsx dev dependency, tsconfig.test.json for path-alias mocking of @/lib/db and @/lib/chain, db-mock.ts and chain-mock.ts for mocked DB and RPC, test-loader.mjs for @/ path resolution. The test script uses tsx with react-server conditions; test:unit preserves the original node-only runner for pure-logic tests.
11 lines
203 B
JSON
11 lines
203 B
JSON
{
|
|
"extends": "./tsconfig.json",
|
|
"compilerOptions": {
|
|
"paths": {
|
|
"@/*": ["./src/*"],
|
|
"@/lib/db": ["./src/lib/db-mock.ts"],
|
|
"@/lib/chain": ["./src/lib/chain-mock.ts"]
|
|
}
|
|
}
|
|
}
|