Page MenuHomeWickedGov Phorge

ipRevealUtils.test.js
No OneTemporary

Size
824 B
Referenced Files
None
Subscribers
None

ipRevealUtils.test.js

'use strict';
const Utils = require( '../../../../modules/ext.checkUser/temporaryaccount/ipRevealUtils.js' );
QUnit.module( 'ext.checkUser.temporaryaccount.ipRevealUtils' );
QUnit.test( 'Test getRevealedStatus when no value set', ( assert ) => {
assert.strictEqual(
Utils.getRevealedStatus( 'abcdef' ),
null,
'getRevealedStatus return value when setRevealedStatus has not been called'
);
} );
QUnit.test( 'Test setRevealedStatus', ( assert ) => {
mw.config.set( 'wgCheckUserTemporaryAccountMaxAge', 1500 );
Utils.setRevealedStatus( 'abcdef' );
assert.strictEqual(
Utils.getRevealedStatus( 'abcdef' ),
'true',
'getRevealedStatus return value after setRevealedStatus is called'
);
// Remove the cookie after the test to avoid breaking other tests.
mw.storage.remove( 'mw-checkuser-temp-abcdef' );
} );

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 18, 20:08 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7e/48/90417c0d4ffacbf77d26288fa291
Default Alt Text
ipRevealUtils.test.js (824 B)

Event Timeline