Skip to content

Commit 25f8e68

Browse files
committed
chore: Cleanup warnings in unit tests
1 parent 2d27fe2 commit 25f8e68

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"@storybook/react": "^8.1.5",
119119
"@storybook/test": "^8.1.5",
120120
"@testing-library/jest-dom": "^6.4.2",
121-
"@testing-library/react": "^14.2.1",
121+
"@testing-library/react": "^16.3.0",
122122
"@testing-library/user-event": "^14.5.2",
123123
"@types/crypto-js": "^4",
124124
"@types/identity-obj-proxy": "^3",

packages/app/src/components/__tests__/DBSearchPageFilters.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe('FilterGroup', () => {
228228
it('should sort options alphabetically by default', () => {
229229
renderWithMantine(<FilterGroup {...defaultProps} />);
230230

231-
const options = screen.getAllByTestId(/filter-checkbox-input/g);
231+
const options = screen.getAllByTestId(/filter-checkbox-input/);
232232
expect(options).toHaveLength(3);
233233
const labels = screen.getAllByText(/apple|banana|zebra/);
234234
expect(labels[0]).toHaveTextContent('apple');
@@ -247,7 +247,7 @@ describe('FilterGroup', () => {
247247
/>,
248248
);
249249

250-
const options = screen.getAllByTestId(/filter-checkbox-input/g);
250+
const options = screen.getAllByTestId(/filter-checkbox-input/);
251251
expect(options).toHaveLength(3);
252252
const labels = screen.getAllByText(/apple|banana|zebra/);
253253
expect(labels[0]).toHaveTextContent('apple');
@@ -276,7 +276,7 @@ describe('FilterGroup', () => {
276276
/>,
277277
);
278278

279-
const options = screen.getAllByTestId(/filter-checkbox-input/g);
279+
const options = screen.getAllByTestId(/filter-checkbox-input/);
280280
expect(options).toHaveLength(3);
281281
const labels = screen.getAllByText(/apple|banana|zebra/);
282282
expect(labels[0]).toHaveTextContent('banana'); // Selected
@@ -309,7 +309,7 @@ describe('FilterGroup', () => {
309309
);
310310
await userEvent.click(showPercentages);
311311

312-
const options = screen.getAllByTestId(/filter-checkbox-input/g);
312+
const options = screen.getAllByTestId(/filter-checkbox-input/);
313313
expect(options).toHaveLength(3);
314314
const labels = screen.getAllByText(/%/);
315315
expect(labels[0]).toHaveTextContent('~99%'); // apple
@@ -328,7 +328,7 @@ describe('FilterGroup', () => {
328328
/>,
329329
);
330330

331-
const options = screen.getAllByTestId(/filter-checkbox-input/g);
331+
const options = screen.getAllByTestId(/filter-checkbox-input/);
332332
expect(options).toHaveLength(3);
333333
const labels = screen.getAllByText(/apple|banana|zebra/);
334334
expect(labels[0]).toHaveTextContent('apple'); // included first
@@ -359,7 +359,7 @@ describe('FilterGroup', () => {
359359
);
360360

361361
// Should show MAX_FILTER_GROUP_ITEMS (10) by default
362-
let options = screen.getAllByTestId(/filter-checkbox-input/g);
362+
let options = screen.getAllByTestId(/filter-checkbox-input/);
363363
expect(options).toHaveLength(10);
364364

365365
// Selected items should be visible even if they would be beyond MAX_FILTER_GROUP_ITEMS
@@ -372,7 +372,7 @@ describe('FilterGroup', () => {
372372
await userEvent.click(showMoreButton);
373373

374374
// Should show all items
375-
options = screen.getAllByTestId(/filter-checkbox-input/g);
375+
options = screen.getAllByTestId(/filter-checkbox-input/);
376376
expect(options).toHaveLength(15);
377377
});
378378

yarn.lock

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4590,7 +4590,7 @@ __metadata:
45904590
"@tanstack/react-table": "npm:^8.7.9"
45914591
"@tanstack/react-virtual": "npm:^3.0.1"
45924592
"@testing-library/jest-dom": "npm:^6.4.2"
4593-
"@testing-library/react": "npm:^14.2.1"
4593+
"@testing-library/react": "npm:^16.3.0"
45944594
"@testing-library/user-event": "npm:^14.5.2"
45954595
"@types/crypto-js": "npm:^4"
45964596
"@types/identity-obj-proxy": "npm:^3"
@@ -9467,7 +9467,7 @@ __metadata:
94679467
languageName: node
94689468
linkType: hard
94699469

9470-
"@testing-library/dom@npm:^9.0.0, @testing-library/dom@npm:^9.3.4":
9470+
"@testing-library/dom@npm:^9.3.4":
94719471
version: 9.3.4
94729472
resolution: "@testing-library/dom@npm:9.3.4"
94739473
dependencies:
@@ -9516,17 +9516,23 @@ __metadata:
95169516
languageName: node
95179517
linkType: hard
95189518

9519-
"@testing-library/react@npm:^14.2.1":
9520-
version: 14.2.1
9521-
resolution: "@testing-library/react@npm:14.2.1"
9519+
"@testing-library/react@npm:^16.3.0":
9520+
version: 16.3.0
9521+
resolution: "@testing-library/react@npm:16.3.0"
95229522
dependencies:
95239523
"@babel/runtime": "npm:^7.12.5"
9524-
"@testing-library/dom": "npm:^9.0.0"
9525-
"@types/react-dom": "npm:^18.0.0"
95269524
peerDependencies:
9527-
react: ^18.0.0
9528-
react-dom: ^18.0.0
9529-
checksum: 10c0/83b35cf8bf5640f1b63b32223ebc75799dc1a8e034d819120b26838fba0b0ab10bdbe6ad07dd8ae8287365f2b0c52dc9892a6fa11bb24d3e63ad97dfb7f2f296
9525+
"@testing-library/dom": ^10.0.0
9526+
"@types/react": ^18.0.0 || ^19.0.0
9527+
"@types/react-dom": ^18.0.0 || ^19.0.0
9528+
react: ^18.0.0 || ^19.0.0
9529+
react-dom: ^18.0.0 || ^19.0.0
9530+
peerDependenciesMeta:
9531+
"@types/react":
9532+
optional: true
9533+
"@types/react-dom":
9534+
optional: true
9535+
checksum: 10c0/3a2cb1f87c9a67e1ebbbcfd99b94b01e496fc35147be8bc5d8bf07a699c7d523a09d57ef2f7b1d91afccd1a28e21eda3b00d80187fbb51b1de01e422592d845e
95309536
languageName: node
95319537
linkType: hard
95329538

0 commit comments

Comments
 (0)