Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5971404
codemirror.init.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
684 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'
];
}
else
if
(
key
===
'cmReadOnly'
)
{
return
true
;
}
}
);
mw
.
user
.
options
.
get
=
jest
.
fn
().
mockImplementation
(
(
key
)
=>
{
if
(
key
===
'usecodemirror'
)
{
return
0
;
}
else
if
(
key
===
'usebetatoolbar'
)
{
return
1
;
}
}
);
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
Sat, Oct 3, 15:09 (17 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/46/421bc67949d28b27c0686272f735
Default Alt Text
codemirror.init.test.js (684 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment