Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4119032
setup.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1009 B
Referenced Files
None
Subscribers
None
setup.js
View Options
const
mockBundle
=
require
(
'../../resources/lib/codemirror6.bundle.dist.js'
);
jest
.
mock
(
'ext.CodeMirror.v6.lib'
,
()
=>
mockBundle
,
{
virtual
:
true
}
);
const
mockCodeMirror
=
require
(
'../../resources/codemirror.js'
);
jest
.
mock
(
'ext.CodeMirror.v6'
,
()
=>
mockCodeMirror
,
{
virtual
:
true
}
);
jest
.
mock
(
'../../resources/ext.CodeMirror.data.js'
,
()
=>
jest
.
fn
(),
{
virtual
:
true
}
);
global
.
mw
=
require
(
'@wikimedia/mw-node-qunit/src/mockMediaWiki.js'
)();
mw
.
user
=
Object
.
assign
(
mw
.
user
,
{
options
:
{
// Only called for 'usecodemirror' option.
get
:
jest
.
fn
().
mockReturnValue
(
1
),
set
:
jest
.
fn
()
},
sessionId
:
jest
.
fn
().
mockReturnValue
(
'abc'
),
getId
:
jest
.
fn
().
mockReturnValue
(
123
),
isNamed
:
jest
.
fn
().
mockReturnValue
(
true
)
}
);
mw
.
config
.
get
=
jest
.
fn
().
mockReturnValue
(
'1000+ edits'
);
mw
.
track
=
jest
.
fn
();
mw
.
Api
.
prototype
.
saveOption
=
jest
.
fn
();
global
.
$
=
require
(
'jquery'
);
$
.
fn
.
textSelection
=
()
=>
{};
window
.
matchMedia
=
jest
.
fn
().
mockReturnValue
(
{
matches
:
false
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 03:07 (2 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b3/80/0dd7e376253edee4224f9e970590
Default Alt Text
setup.js (1009 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment