Skip to content

Commit

Permalink
Mock nanoid in jest
Browse files Browse the repository at this point in the history
* ai/nanoid#395
* ai/nanoid#439
* for some reason, doesn't play nice with jest, so we'll do this until we can switch to a different test framework
  • Loading branch information
gjoseph committed Nov 22, 2024
1 parent eb9cbfb commit 4b99c2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tichu-clients/packages/tichu-web/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";

jest.mock("nanoid", () => {
return {
nanoid: () => {},
};
});

0 comments on commit 4b99c2b

Please sign in to comment.