mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-25 06:36:32 +00:00
9ccad5a405
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: I5c4c595c4520cecfad46d652f639a63a1c2c00b4 |
||
---|---|---|
.. | ||
skins.minerva.notifications.badge | ||
skins.minerva.scripts |