mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 11:46:55 +00:00
cb362d125c
Replace all test assertions for calledOnce / Twice with callCount. assert.ok( calledOnce / Twice ) only lets the dev know that a test fails. assert.strictEqual( callCount, EXPECTATION ) starts the debugging process when it fails since it provides the difference in the failure output. strictEqual() was deliberately used since it's a saner default and the codebase already favors === equivalency checks. find tests -name \*.js| xargs -rd\\n sed -ri ' s%ok\(([^,]+)calledOnce%strictEqual(\1callCount, 1%g; s%ok\(([^,]+)calledTwice%strictEqual(\1callCount, 2%g; ' Change-Id: I07c3c6d20e07c5b8107583a01d820e3fbd68a4e1 |
||
---|---|---|
.. | ||
eventLogging.test.js | ||
statsv.test.js |