Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1eb3eca3
Commit
1eb3eca3
authored
May 15, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loadJSONFixtures wrapper in Jest
parent
0c63ad85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
spec/frontend/test_setup.js
spec/frontend/test_setup.js
+6
-3
No files found.
spec/frontend/test_setup.js
View file @
1eb3eca3
...
...
@@ -3,7 +3,7 @@ import * as jqueryMatchers from 'custom-jquery-matchers';
import
Translate
from
'
~/vue_shared/translate
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
initializeTestTimeout
}
from
'
./helpers/timeout
'
;
import
{
getJSONFixture
,
loadHTMLFixture
,
setHTMLFixture
}
from
'
./helpers/fixtures
'
;
import
{
loadHTMLFixture
,
setHTMLFixture
}
from
'
./helpers/fixtures
'
;
process
.
on
(
'
unhandledRejection
'
,
global
.
promiseRejectionHandler
);
...
...
@@ -46,9 +46,12 @@ Object.defineProperty(global.Element.prototype, 'innerText', {
// convenience wrapper for migration from Karma
Object
.
assign
(
global
,
{
loadFixtures
:
loadHTMLFixture
,
loadJSONFixtures
:
getJSONFixture
,
preloadFixtures
()
{},
setFixtures
:
setHTMLFixture
,
// The following functions fill the fixtures cache in Karma.
// This is not necessary in Jest because we make no Ajax request.
loadJSONFixtures
()
{},
preloadFixtures
()
{},
});
// custom-jquery-matchers was written for an old Jest version, we need to make it compatible
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment