Skip to content

Commit 68d7c47

Browse files
committed
Make tests valid for large numbers
1 parent 4f32fbf commit 68d7c47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test('displays title correctly', () => {
99
test('displays points value', () => {
1010
render(<App />);
1111
const pointsElement = screen.getByText((content, element) => {
12-
const hasText = (node) => node.textContent.match(/points: \d+/i);
12+
const hasText = (node) => node.textContent.match(/points: [\d.\w]+/i);
1313
const elementHasText = hasText(element);
1414
const childrenDontHaveText = Array.from(element.children).every(
1515
(child) => !hasText(child),

0 commit comments

Comments
 (0)