Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Merge requests
!39496
Step 2 - Setup `useFakeDate` by default in Jest
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Step 2 - Setup `useFakeDate` by default in Jest
236004-use-fake-date-everywhere
into
master
Overview
65
Commits
5
Pipelines
21
Changes
2
All threads resolved!
Hide all comments
Merged
Paul Slaughter
requested to merge
236004-use-fake-date-everywhere
into
master
4 years ago
Overview
65
Commits
5
Pipelines
21
Changes
2
All threads resolved!
Hide all comments
Expand
Step 1 - Add fake_date test helper
Step 2 - Setup
useFakeDate
by default in Jest
Step 3 - Update default fake date to match rspec fixtures
Step 3 - Add helper for
useFixturesFakeDate
What does this MR do?
This MR sets up
useFakeDate
by default in our Jest environment
Edited
4 years ago
by
Paul Slaughter
1
0
Merge request reports
Viewing commit
e51654c1
Show latest version
2 files
+
4
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Unverified
e51654c1
Update jest fake_date for rspec consistency
· e51654c1
Paul Slaughter
authored
4 years ago
spec/frontend/__helpers__/fake_date.js
+
3
−
2
Options
// Frida Kahlo's birthday (6 = July)
// Date used in `spec/support/helpers/javascript_fixtures_helpers.rb`
export
const
DEFAULT_ARGS
=
[
2020
,
6
,
6
];
// Also Franz Kafka's Birthday (6 = July)
export
const
DEFAULT_ARGS
=
[
2015
,
6
,
3
,
10
];
const
RealDate
=
Date
;
const
RealDate
=
Date
;
Loading