Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5987915
codemirror.init.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
658 B
Referenced Files
None
Subscribers
None
codemirror.init.test.js
View Options
describe
(
'CodeMirror.init.js'
,
()
=>
{
it
(
'should load only ext.WikiEditor for read-only pages with usebetatoolbar=1'
,
()
=>
{
mw
.
config
.
get
=
jest
.
fn
().
mockImplementation
(
(
key
)
=>
{
if
(
key
===
'cmRLModules'
)
{
return
[
'ext.CodeMirror.v6'
,
'ext.CodeMirror.v6.WikiEditor'
];
}
else
if
(
key
===
'cmReadOnly'
)
{
return
true
;
}
}
);
mw
.
user
.
options
.
get
=
jest
.
fn
().
mockImplementation
(
(
key
)
=>
{
if
(
key
===
'usecodemirror'
)
{
return
0
;
}
}
);
const
spy
=
jest
.
spyOn
(
mw
.
loader
,
'load'
);
require
(
'../../resources/codemirror.init.js'
);
expect
(
spy
).
toHaveBeenCalledWith
(
'ext.wikiEditor'
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 00:37 (2 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
18/80/e8ad74742bed09327765d21a1b57
Default Alt Text
codemirror.init.test.js (658 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment