Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4068042
page.test.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
page.test.js
View Options
import
createPagePreviewGateway
from
'../../../src/gateway/page'
;
import
*
as
RestModule
from
'../../../src/gateway/rest'
;
import
*
as
MediawikiModule
from
'../../../src/gateway/mediawiki'
;
QUnit
.
module
(
'gateway/page.js'
,
{
beforeEach
()
{
mw
.
Api
=
function
()
{};
this
.
createMediaWikiApiGateway
=
this
.
sandbox
.
stub
(
MediawikiModule
,
'default'
);
this
.
createRESTBaseGateway
=
this
.
sandbox
.
stub
(
RestModule
,
'default'
);
this
.
config
=
new
Map
();
}
}
);
QUnit
.
test
(
'it uses mediawiki plain text gateway with wgPopupsGateway == "mwApiPlain"'
,
function
(
assert
)
{
this
.
config
.
set
(
'wgPopupsGateway'
,
'mwApiPlain'
);
createPagePreviewGateway
(
this
.
config
);
assert
.
true
(
this
.
createMediaWikiApiGateway
.
called
,
'MW plain text gateway called'
);
}
);
QUnit
.
test
(
'it uses rest plain text gateway with wgPopupsGateway == "restbasePlain"'
,
function
(
assert
)
{
this
.
config
.
set
(
'wgPopupsGateway'
,
'restbasePlain'
);
createPagePreviewGateway
(
this
.
config
);
assert
.
true
(
this
.
createRESTBaseGateway
.
called
,
'REST plain text gateway called'
);
}
);
QUnit
.
test
(
'it uses rest HTML gateway with wgPopupsGateway == "restbaseHTML"'
,
function
(
assert
)
{
this
.
config
.
set
(
'wgPopupsGateway'
,
'restbaseHTML'
);
createPagePreviewGateway
(
this
.
config
);
assert
.
true
(
this
.
createRESTBaseGateway
.
called
,
'REST HTML gateway called'
);
}
);
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Aug 16 2026, 19:28 (11 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8e/6c/410b67db36efc047cf77e91116a3
Default Alt Text
page.test.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment