Skip to content

Commit

Permalink
Remove toBeArrayOfUniqueItems custom matcher
Browse files Browse the repository at this point in the history
It is only ever used to assert that an array returned by Object.keys is
unique, and that's always going to be true as an object can't have two
keys with the same name.
  • Loading branch information
BPScott committed Sep 18, 2024
1 parent 979fa8b commit 4fc3e4e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 58 deletions.
1 change: 0 additions & 1 deletion packages/react-i18n/src/tests/e2e/server.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ describe('server', () => {
const translations = manager.extract();

const extractedTranslations = Object.values(translations);
expect(Object.keys(translations)).toBeArrayOfUniqueItems();
expect(extractedTranslations).toContain(frCATranslations);
expect(extractedTranslations).toContain(frTranslations);
});
Expand Down
2 changes: 0 additions & 2 deletions packages/react-i18n/src/tests/manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ describe('I18nManager', () => {
await manager.resolve();

const translationsByID = manager.extract();
expect(Object.keys(translationsByID)).toBeArrayOfUniqueItems();

const translations = Object.values(translationsByID);
expect(translations).toContain(enUS);
expect(translations).toContain(en);
Expand Down
27 changes: 0 additions & 27 deletions packages/react-i18n/src/tests/matchers.ts

This file was deleted.

27 changes: 0 additions & 27 deletions tests/matchers/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion tests/setup/tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '../matchers';
import '../../packages/react-testing/src/matchers';
import '../../packages/graphql-testing/src/matchers';

Expand Down

0 comments on commit 4fc3e4e

Please sign in to comment.