[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M769DWK9FCYR6QRBHHH3DGMC":3,"skill-same:01M769DWK9FCYR6QRBHHH3DGMC":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M769DWK9FCYR6QRBHHH3DGMC","testing-rules",null,"MUST NOT \u002F SHOULD NOT rules for automated tests: assertions, mocks, fixtures, isolation, timing, snapshots, and coverage, for Vitest, Jest, backend integration, component, Swift, and .NET tests. Use when writing, reviewing, or fixing a test. Browser tests also load playwright-rules.","jonathanong\u002Fno-mistakes","jonathanong","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F643505?v=4","01M72BK9Y3KZF7M2AM14BMJBAK","jongleberry","01M72BK9YTVF9K5MW3524R0YJ3",11,"MIT","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Ftesting-rules\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: testing-rules\ndescription: \"MUST NOT \u002F SHOULD NOT rules for automated tests: assertions, mocks, fixtures, isolation, timing, snapshots, and coverage, for Vitest, Jest, backend integration, component, Swift, and .NET tests. Use when writing, reviewing, or fixing a test. Browser tests also load playwright-rules.\"\n---\n\n# Testing rules\n\nMUST NOT is a defect. SHOULD NOT needs a stated reason.\n\n## Assertions\n\n- MUST NOT write an assertion that cannot fail (literal, self-comparison, mock echo, only checking a value is defined); assert an outcome a defect would change.\n- MUST NOT run production code in a test without asserting its outcome.\n- MUST NOT name a test for behavior it never asserts.\n- MUST NOT match error message text; assert type, code, or structured fields.\n- MUST NOT raise coverage with weak tests or exclude files from coverage; strengthen the test or refactor the code.\n- MUST NOT treat a passing rerun as a fix for a flaky test; find the cause.\n- MUST NOT assert something about every item in a collection without asserting it is non-empty; a per-item assertion passes over zero items. Asserting the collection equals `[]` is fine.\n- MUST NOT accept \"either outcome is fine\" when one outcome is a degraded fallback.\n- MUST NOT write a regression test whose fixture never reaches the bug's precondition; confirm it fails without the fix.\n- SHOULD NOT add a test that locks in a branch you believe is unreachable; delete the branch or prove it reachable.\n- SHOULD NOT trust a green exit code; check the number of tests that ran.\n- SHOULD NOT keep redundant tests; keep one failure-sensitive test per contract at the lowest realistic boundary.\n- SHOULD NOT recompute the production algorithm in the test; a shared bug cancels out.\n- SHOULD NOT assert what a dependency owns (its messages, markup, call order, exact versions or pins); assert your own outcome.\n- SHOULD NOT freeze documentation prose in tests unless a consumer parses that exact text.\n\n## Mocks and boundaries\n\n- MUST NOT mock the module under test; mock transports, clocks, providers, and environment at the boundary.\n- MUST NOT replace a mocked module's whole export object; spread the real module and override what you need.\n- MUST NOT leave spies, env, timers, or globals unrestored after a test.\n- MUST NOT use call-order fakes for calls whose order you do not own; route fakes by method and path.\n- MUST NOT add test-only branches or placeholders to production code.\n- MUST NOT patch a name the code under test never looks up (the definition instead of the import site); prove the patch is live by asserting a call on a path that should make one, even when the test's contract is no calls.\n- MUST NOT patch a process-wide global and assert an exact call count; other code in the process calls it too.\n- MUST NOT test that an import has no side effect from a process that already imported it.\n- SHOULD NOT mock in integration tests, or rely on mock-only tests where wiring, serialization, transactions, or retries are the contract.\n- SHOULD NOT keep a production export only so tests can reach it; test through the public surface.\n\n## Isolation and timing\n\n- MUST NOT leave `.only`, `.skip`, `.todo`, or conditional skips; fix or delete the test.\n- MUST NOT share mutable module-scope state between tests, or depend on test order; build state per test.\n- MUST NOT mark suites sequential to hide shared state; remove the shared state.\n- MUST NOT sleep or use timing waits; await the specific condition with a named deadline.\n- MUST NOT read the real clock; inject one.\n- MUST NOT let gating tests call live third parties; replay recorded responses.\n- MUST NOT skip a test when a credential or service is missing in CI; fail it.\n- MUST NOT assert \"nothing happened\" before the event that would have caused it has settled.\n- MUST NOT leak workers, subscriptions, handles, or console output past the test.\n- MUST NOT attach a rejection, event, or response observer after the action that triggers it; register first.\n- MUST NOT raise or remove a timeout to hide slowness; fix the wait condition.\n- MUST NOT use fixed identities in a shared store, or reset shared state broadly; randomize ids and clean only what the test owns.\n- MUST NOT bind port 0 or real network services in unit tests.\n- MUST NOT scan the live repository checkout from unit tests; use saved fixtures.\n- MUST NOT change shared database schema or server settings inside tests; migrate before the suite.\n- MUST NOT hardcode dates a test depends on being in the future or past; derive them from the injected clock.\n\n## Fixtures and snapshots\n\n- MUST NOT write fixture files inline (`writeFile`, `mkdir`) in test code; save them under a fixtures directory and copy them in.\n- MUST NOT fix a bug without a regression test.\n- MUST NOT accept a changed snapshot without reviewing the diff, or regenerate snapshots by default in CI.\n- MUST NOT hardcode git SHAs, real email domains, or real credentials in fixtures; use reserved test values.\n- SHOULD NOT build fixtures by bypassing public constructors; keep them minimal and typed.\n- SHOULD NOT hide expectations inside shared helpers; helpers remove setup only.\n- SHOULD NOT add aggregate test files that only import other tests.\n- SHOULD NOT build a \"nothing was forgotten\" guard as an allow-list; use a deny-list so new files are covered by default.\n\n## Platform notes\n\n- MUST NOT mock navigation, headers, cookies, or server-only APIs inside the component under test; mock at the framework edge or move the test to the browser.\n- MUST NOT let Swift test doubles deliver after `stopLoading()` or share state without synchronization.\n- SHOULD NOT share process or filesystem state across .NET tests, or assert private implementation instead of the serialized contract.\n- SHOULD NOT use a story as end-to-end setup; keep story data local and deterministic.\n","# Testing rules\n\nMUST NOT is a defect. SHOULD NOT needs a stated reason.\n\n## Assertions\n\n- MUST NOT write an assertion that cannot fail (literal, self-comparison, mock echo, only checking a value is defined); assert an outcome a defect would change.\n- MUST NOT run production code in a test without asserting its outcome.\n- MUST NOT name a test for behavior it never asserts.\n- MUST NOT match error message text; assert type, code, or structured fields.\n- MUST NOT raise coverage with weak tests or exclude files from coverage; strengthen the test or refactor the code.\n- MUST NOT treat a passing rerun as a fix for a flaky test; find the cause.\n- MUST NOT assert something about every item in a collection without asserting it is non-empty; a per-item assertion passes over zero items. Asserting the collection equals `[]` is fine.\n- MUST NOT accept \"either outcome is fine\" when one outcome is a degraded fallback.\n- MUST NOT write a regression test whose fixture never reaches the bug's precondition; confirm it fails without the fix.\n- SHOULD NOT add a test that locks in a branch you believe is unreachable; delete the branch or prove it reachable.\n- SHOULD NOT trust a green exit code; check the number of tests that ran.\n- SHOULD NOT keep redundant tests; keep one failure-sensitive test per contract at the lowest realistic boundary.\n- SHOULD NOT recompute the production algorithm in the test; a shared bug cancels out.\n- SHOULD NOT assert what a dependency owns (its messages, markup, call order, exact versions or pins); assert your own outcome.\n- SHOULD NOT freeze documentation prose in tests unless a consumer parses that exact text.\n\n## Mocks and boundaries\n\n- MUST NOT mock the module under test; mock transports, clocks, providers, and environment at the boundary.\n- MUST NOT replace a mocked module's whole export object; spread the real module and override what you need.\n- MUST NOT leave spies, env, timers, or globals unrestored after a test.\n- MUST NOT use call-order fakes for calls whose order you do not own; route fakes by method and path.\n- MUST NOT add test-only branches or placeholders to production code.\n- MUST NOT patch a name the code under test never looks up (the definition instead of the import site); prove the patch is live by asserting a call on a path that should make one, even when the test's contract is no calls.\n- MUST NOT patch a process-wide global and assert an exact call count; other code in the process calls it too.\n- MUST NOT test that an import has no side effect from a process that already imported it.\n- SHOULD NOT mock in integration tests, or rely on mock-only tests where wiring, serialization, transactions, or retries are the contract.\n- SHOULD NOT keep a production export only so tests can reach it; test through the public surface.\n\n## Isolation and timing\n\n- MUST NOT leave `.only`, `.skip`, `.todo`, or conditional skips; fix or delete the test.\n- MUST NOT share mutable module-scope state between tests, or depend on test order; build state per test.\n- MUST NOT mark suites sequential to hide shared state; remove the shared state.\n- MUST NOT sleep or use timing waits; await the specific condition with a named deadline.\n- MUST NOT read the real clock; inject one.\n- MUST NOT let gating tests call live third parties; replay recorded responses.\n- MUST NOT skip a test when a credential or service is missing in CI; fail it.\n- MUST NOT assert \"nothing happened\" before the event that would have caused it has settled.\n- MUST NOT leak workers, subscriptions, handles, or console output past the test.\n- MUST NOT attach a rejection, event, or response observer after the action that triggers it; register first.\n- MUST NOT raise or remove a timeout to hide slowness; fix the wait condition.\n- MUST NOT use fixed identities in a shared store, or reset shared state broadly; randomize ids and clean only what the test owns.\n- MUST NOT bind port 0 or real network services in unit tests.\n- MUST NOT scan the live repository checkout from unit tests; use saved fixtures.\n- MUST NOT change shared database schema or server settings inside tests; migrate before the suite.\n- MUST NOT hardcode dates a test depends on being in the future or past; derive them from the injected clock.\n\n## Fixtures and snapshots\n\n- MUST NOT write fixture files inline (`writeFile`, `mkdir`) in test code; save them under a fixtures directory and copy them in.\n- MUST NOT fix a bug without a regression test.\n- MUST NOT accept a changed snapshot without reviewing the diff, or regenerate snapshots by default in CI.\n- MUST NOT hardcode git SHAs, real email domains, or real credentials in fixtures; use reserved test values.\n- SHOULD NOT build fixtures by bypassing public constructors; keep them minimal and typed.\n- SHOULD NOT hide expectations inside shared helpers; helpers remove setup only.\n- SHOULD NOT add aggregate test files that only import other tests.\n- SHOULD NOT build a \"nothing was forgotten\" guard as an allow-list; use a deny-list so new files are covered by default.\n\n## Platform notes\n\n- MUST NOT mock navigation, headers, cookies, or server-only APIs inside the component under test; mock at the framework edge or move the test to the browser.\n- MUST NOT let Swift test doubles deliver after `stopLoading()` or share state without synchronization.\n- SHOULD NOT share process or filesystem state across .NET tests, or assert private implementation instead of the serialized contract.\n- SHOULD NOT use a story as end-to-end setup; keep story data local and deterministic.\n",{"name":5,"description":7},"main","2912ab60e077705342a9031516399783aa7f5255","plugins\u002Fno-mistakes-rules\u002Fskills\u002Ftesting-rules",1,"https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes","https:\u002F\u002Fgithub.com\u002Fjonathanong","https:\u002F\u002Fjongleberry.com","@expressjs @koajs @jshttp @pillarjs ","2026-11-15 04:43:39",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add jonathanong\u002Fno-mistakes --skill testing-rules",{"tool":39,"command":40},"bunx","bunx skills add jonathanong\u002Fno-mistakes --skill testing-rules",{"tool":42,"command":43},"pnpm","pnpm dlx skills add jonathanong\u002Fno-mistakes --skill testing-rules","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Ftesting-rules\u002FSKILL.md",true,[],[48,56,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":55},"01M78R0B1G0N7C5MK135GKWF5M","rollout-rules","MUST NOT \u002F SHOULD NOT rules for shipping changes safely: feature flags, deploy order across services, API and message compatibility, irreversible actions, and string-referenced config. Use when adding a flag, changing an API or message contract, deploying a change that spans services, or touching money-moving or irreversible actions.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Frollout-rules\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":55},"01M78R01TNND6HJYM8YHWTAM2P","observability-rules","MUST NOT \u002F SHOULD NOT rules for logs, metrics, and alerts: static messages and structured fields, personal data, metric cardinality, fields monitors depend on, absence alerts, and context binding. Use when adding or reviewing logging, metrics, or monitors.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Fobservability-rules\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":55},"01M78QZZ9X353064KF1V7CX47X","integrations-rules","MUST NOT \u002F SHOULD NOT rules for third-party APIs and inbound webhooks: response classification, retries and idempotency, delivery records, payload mapping, timestamps and units, batch failure policy, and signature verification. Use when calling, parsing, or receiving a partner or vendor API.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Fintegrations-rules\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M769DZRM1XK1A806Q5STPJ7P","typescript-rules","MUST NOT \u002F SHOULD NOT rules for TypeScript, JavaScript, and Node.js: async and promises, errors, mutation, aliases and dead paths, static analysis, process lifecycle, HTTP clients, caches like Redis or Valkey, and package boundaries. Use when writing or reviewing TS\u002FJS or Node code.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Ftypescript-rules\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M769DSBAADFTZZ8JDWSBBT3Y","security-rules","MUST NOT \u002F SHOULD NOT rules for application security and HTTP APIs: secrets, auth and sessions, SSRF, injection, CSRF, CSP, LLM prompts, response exposure, and API shape. Use when writing or reviewing an endpoint, auth code, secret handling, outbound fetches, or LLM calls.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Fsecurity-rules\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M769DP8CJDMVP8S50994GM4P","rust-rules","MUST NOT \u002F SHOULD NOT rules for Rust: lints, test layout, file size, parallelism, hot loops, caching, build hygiene, and performance claims. Use when writing or reviewing Rust code or running heavy cargo builds.","https:\u002F\u002Fgithub.com\u002Fjonathanong\u002Fno-mistakes\u002Fblob\u002Fmain\u002Fplugins\u002Fno-mistakes-rules\u002Fskills\u002Frust-rules\u002FSKILL.md",[],[]]