Skip to content

Commit

Permalink
add TextEncoder to test framework setup for count script test
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Oct 2, 2024
1 parent 546484f commit c4be6c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions client/src/core/client/count/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { TextEncoder } from "util";

import { COUNT_SELECTOR } from "coral-framework/constants";
import {
bytesToBase64,
Expand Down
4 changes: 4 additions & 0 deletions client/src/core/client/test/setupTestFramework.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "@testing-library/jest-dom";
import { toHaveNoViolations } from "jest-axe";
import { TextEncoder } from "util";

import expectAndFail from "./expectAndFail";

Expand All @@ -14,6 +15,9 @@ import "./setupConsole";
// to get around: https://github.com/facebook/jest/issues/3917
(global as any).expectAndFail = expectAndFail;

// we need to have this for count script
(global as any).TextEncoder = TextEncoder;

// Log unhandled rejections.
// eslint-disable-next-line no-console
process.on("unhandledRejection", (err) => {
Expand Down

0 comments on commit c4be6c8

Please sign in to comment.