You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an ESLint rule that bans `assert.doesNotThrow()` in test files.
All entries where it was used are fixed and CLAUDE.md is adjusted,
since the comment is not needed anymore.
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Ruben Bridgewater <[email protected]>
Copy file name to clipboardExpand all lines: AGENTS.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,8 +115,6 @@ Use `node:assert/strict` for standard assertions. For partial deep object checks
115
115
116
116
Favor fewer `assert.deepStrictEqual`/`assertObjectContains` calls over many `assert.strictEqual` calls. Combine existing calls, when touching test files.
117
117
118
-
Never use the `doesNotThrow()` assertion. Instead, execute the method directly.
119
-
120
118
### Time-Based Testing
121
119
122
120
**Never rely on actual time passing in unit tests.** Use sinon's fake timers to mock time and make tests deterministic and fast.
0 commit comments