Commit 686b23d1 authored by Simon Knox's avatar Simon Knox

Fix flaky spec caused by time-dependent snapshot

parent 8568e12b
...@@ -117,7 +117,7 @@ exports[`MergeRequestTable component template matches the snapshot 1`] = ` ...@@ -117,7 +117,7 @@ exports[`MergeRequestTable component template matches the snapshot 1`] = `
</li> </li>
<li> <li>
opened 1 month ago opened just now
</li> </li>
<li> <li>
......
...@@ -59,6 +59,8 @@ describe('MergeRequestTable component', () => { ...@@ -59,6 +59,8 @@ describe('MergeRequestTable component', () => {
describe('template', () => { describe('template', () => {
beforeEach(() => { beforeEach(() => {
jest.spyOn(global, 'Date').mockImplementationOnce(() => new Date('2020-03-09T11:01:58.135Z'));
bootstrap({ mergeRequests }); bootstrap({ mergeRequests });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment