Skip to content

Commit

Permalink
Made date/time test timezone independent [RCORE-684]
Browse files Browse the repository at this point in the history
  • Loading branch information
ewagoner committed Mar 22, 2023
1 parent 9f7e120 commit f39fc6c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react'
import { Route } from 'react-router'
import { MemoryRouter } from 'react-router-dom'
import { format } from 'date-fns'
import '@testing-library/jest-dom'
import { renderWithProviders } from '@opentrons/components'
import {
Expand Down Expand Up @@ -92,7 +93,12 @@ describe('ODDProtocolDetails', () => {
})
it('renders the protocol date added', () => {
const [{ getByText }] = render()
getByText('Date Added: 05/03/2022')
getByText(
`Date Added: ${format(
new Date('2022-05-03T21:36:12.494778+00:00'),
'MM/dd/yyyy k:mm'
)}`
)
})
it('renders the pin protocol button', () => {
const [{ getByText }] = render()
Expand Down

0 comments on commit f39fc6c

Please sign in to comment.