Skip to content

Commit 684f6a6

Browse files
committed
#1640: testing is killing me slowly
1 parent eaf67f5 commit 684f6a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/frontend/src/tests/pages/ChangeRequestDetailPage/ImplementedChangesList.test.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { render, screen, routerWrapperBuilder } from '../../test-support/test-ut
77
import { ImplementedChange } from 'shared';
88
import { exampleStandardImplementedChangeRequest } from '../../test-support/test-data/change-requests.stub';
99
import ImplementedChangesList from '../../../pages/ChangeRequestDetailPage/ImplementedChangesList';
10+
import { datePipe } from '../../../utils/pipes';
1011

1112
/**
1213
* Sets up the component under test with the desired values and renders it.
@@ -25,7 +26,13 @@ describe('Rendering Implemented Changes List Component', () => {
2526
renderComponent(exampleStandardImplementedChangeRequest.implementedChanges);
2627

2728
expect(
28-
screen.getByText(`Implemented Changes — ${exampleStandardImplementedChangeRequest.dateImplemented ?? 'N/A'}`)
29+
screen.getByText(
30+
`Implemented Changes — ${
31+
exampleStandardImplementedChangeRequest.dateImplemented
32+
? datePipe(exampleStandardImplementedChangeRequest.dateImplemented)
33+
: 'N/A'
34+
}`
35+
)
2936
).toBeInTheDocument();
3037
expect(screen.getByText('1.23.3')).toBeInTheDocument();
3138
expect(screen.getByText(/Increase budget to 200/i)).toBeInTheDocument();

0 commit comments

Comments
 (0)