mediawiki-skins-MinervaNeue/tests/qunit/skins.minerva.scripts/integration.test.js
Ed Sanders a6ab8d6da3 Prefer arrow callbacks (ESLint autofix)
Change-Id: I52b2feacd6216e99e04f193ba963e897b3e1a771
2024-06-04 08:01:54 -07:00

19 lines
670 B
JavaScript

/*!
* Minerva integration tests.
*
* This should only be used to test APIs that Minerva depends on to work.
* For unit tests please see tests/jest.
*/
QUnit.module( 'Minerva (integration)', () => {
QUnit.test( '[T356653] Client preferences: Check assumptions about the cookie it writes to', function ( assert ) {
mw.cookie.set( 'mwclientpreferences', '' );
this.sandbox.stub( mw.user, 'isAnon' ).returns( true );
document.documentElement.setAttribute( 'class', 'skin-theme-clientpref-day' );
mw.user.clientPrefs.set( 'skin-theme', 'night' );
assert.strictEqual(
mw.cookie.get( 'mwclientpreferences' ),
'skin-theme-clientpref-night'
);
} );
} );