Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4107630
ipRevealUtils.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
824 B
Referenced Files
None
Subscribers
None
ipRevealUtils.test.js
View Options
'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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment