Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4103885
jest.setup.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
jest.setup.js
View Options
'use strict'
;
/* eslint-disable no-undef */
const
{
config
}
=
require
(
'@vue/test-utils'
);
const
mockMediaWiki
=
require
(
'@wikimedia/mw-node-qunit/src/mockMediaWiki.js'
);
// Mock Vue plugins in test suites
global
.
mw
=
mockMediaWiki
();
global
.
mw
.
message
=
jest
.
fn
(
(
...
messageKeyAndParams
)
=>
(
{
text
:
()
=>
`(
${
messageKeyAndParams
.
join
(
', '
)
}
)`
,
parse
:
()
=>
`(
${
messageKeyAndParams
.
join
(
', '
)
}
)`
,
escaped
:
()
=>
`(
${
messageKeyAndParams
.
join
(
', '
)
}
)`
}
)
);
global
.
mw
.
storage
=
{
session
:
{
get
:
jest
.
fn
(),
set
:
jest
.
fn
()
},
set
:
jest
.
fn
()
};
global
.
mw
.
notify
=
jest
.
fn
();
config
.
global
.
mocks
=
{
$i18n
:
(
...
messageKeyAndParams
)
=>
(
{
text
:
()
=>
'('
+
messageKeyAndParams
.
join
(
', '
)
+
')'
,
parse
:
()
=>
'('
+
messageKeyAndParams
.
join
(
', '
)
+
')'
}
)
};
config
.
global
.
directives
=
{
'i18n-html'
:
(
el
,
binding
)
=>
{
el
.
innerHTML
=
`
${
binding
.
arg
}
(
${
binding
.
value
}
)`
;
}
};
// Ignore all "teleport" behavior for the purpose of testing Dialog;
// see https://test-utils.vuejs.org/guide/advanced/teleport.html
config
.
global
.
stubs
=
{
teleport
:
true
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 18:12 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2a/7a/0498104b0d31ec2e518fdd40c8ae
Default Alt Text
jest.setup.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment