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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d1834208
Commit
d1834208
authored
Aug 13, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add useFakeDate in test_setup
parent
c26b7daf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
+4
-6
ee/spec/frontend/analytics/code_review_analytics/components/__snapshots__/merge_request_table_spec.js.snap
...components/__snapshots__/merge_request_table_spec.js.snap
+1
-1
ee/spec/frontend/analytics/code_review_analytics/components/merge_request_table_spec.js
...e_review_analytics/components/merge_request_table_spec.js
+0
-2
ee/spec/frontend/threat_monitoring/components/network_policy_list_spec.js
.../threat_monitoring/components/network_policy_list_spec.js
+0
-3
spec/frontend/test_setup.js
spec/frontend/test_setup.js
+3
-0
No files found.
ee/spec/frontend/analytics/code_review_analytics/components/__snapshots__/merge_request_table_spec.js.snap
View file @
d1834208
...
...
@@ -117,7 +117,7 @@ exports[`MergeRequestTable component template matches the snapshot 1`] = `
</li>
<li>
opened
just now
opened
5 months ago
</li>
<li>
...
...
ee/spec/frontend/analytics/code_review_analytics/components/merge_request_table_spec.js
View file @
d1834208
...
...
@@ -58,8 +58,6 @@ describe('MergeRequestTable component', () => {
describe
(
'
template
'
,
()
=>
{
beforeEach
(()
=>
{
jest
.
spyOn
(
global
,
'
Date
'
).
mockImplementationOnce
(()
=>
new
Date
(
'
2020-03-09T11:01:58.135Z
'
));
bootstrap
({
mergeRequests
:
mockMergeRequests
});
});
...
...
ee/spec/frontend/threat_monitoring/components/network_policy_list_spec.js
View file @
d1834208
...
...
@@ -4,15 +4,12 @@ import NetworkPolicyList from 'ee/threat_monitoring/components/network_policy_li
import
PolicyDrawer
from
'
ee/threat_monitoring/components/policy_editor/policy_drawer.vue
'
;
import
{
PREDEFINED_NETWORK_POLICIES
}
from
'
ee/threat_monitoring/constants
'
;
import
createStore
from
'
ee/threat_monitoring/store
'
;
import
{
useFakeDate
}
from
'
helpers/fake_date
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
mockPoliciesResponse
}
from
'
../mock_data
'
;
const
mockData
=
mockPoliciesResponse
.
map
((
policy
)
=>
convertObjectPropsToCamelCase
(
policy
));
describe
(
'
NetworkPolicyList component
'
,
()
=>
{
useFakeDate
();
let
store
;
let
wrapper
;
...
...
spec/frontend/test_setup.js
View file @
d1834208
...
...
@@ -8,6 +8,7 @@ import { initializeTestTimeout } from './__helpers__/timeout';
import
{
getJSONFixture
,
loadHTMLFixture
,
setHTMLFixture
}
from
'
./__helpers__/fixtures
'
;
import
{
setupManualMocks
}
from
'
./mocks/mocks_helper
'
;
import
customMatchers
from
'
./matchers
'
;
import
{
useFakeDate
}
from
'
./helpers/fake_date
'
;
import
'
./__helpers__/dom_shims
'
;
import
'
./__helpers__/jquery
'
;
...
...
@@ -20,6 +21,8 @@ process.on('unhandledRejection', global.promiseRejectionHandler);
setupManualMocks
();
useFakeDate
();
afterEach
(()
=>
// give Promises a bit more time so they fail the right test
new
Promise
(
setImmediate
).
then
(()
=>
{
...
...
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