Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix walletSummary spec to use a constant date
Browse files Browse the repository at this point in the history
  • Loading branch information
cg505 committed Jun 18, 2019
1 parent 4d6abdb commit 7ceda45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/features/rewards/walletSummary/spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ describe('WalletSummary tests', () => {

describe('basic tests', () => {
it('matches the snapshot', () => {
const RealDate = Date
global.Date = class extends RealDate {
constructor () {
return new RealDate('2019-06-02')
}
}
const component = baseComponent(props)
const tree = create(component).toJSON()
expect(tree).toMatchSnapshot()
global.Date = RealDate
})

it('renders the component', () => {
Expand Down

0 comments on commit 7ceda45

Please sign in to comment.