mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
Hygiene: Avoid touching internal state in tests
Test what mw.popups.haveCheckinActionsBeenSetup guards against so that it doesn't have to be touched during the associated test. Bug: T147314 Change-Id: I315e0782a0e3b1d04878f1ee6f538e54531f7df5
This commit is contained in:
parent
4afa1958a0
commit
60adbd0831
|
@ -82,9 +82,9 @@
|
|||
|
||||
assert.expect( 1 );
|
||||
|
||||
checkin.haveCheckinActionsBeenSetup = true;
|
||||
checkin.setupActions( actionSpy );
|
||||
assert.ok( spy.notCalled, 'setVisibleTimeout has not been called.' );
|
||||
checkin.setupActions( actionSpy );
|
||||
assert.strictEqual( spy.callCount, 1, 'setVisibleTimeout is only ever called once.' );
|
||||
} );
|
||||
|
||||
QUnit.test( 'checkin actions are setup correctly', function ( assert ) {
|
||||
|
|
Loading…
Reference in a new issue