Skip to content

Commit 8703f6e

Browse files
authored
test: add integration tests for email breach alerts job (#6206)
1 parent 09c2af4 commit 8703f6e

File tree

5 files changed

+571
-695
lines changed

5 files changed

+571
-695
lines changed

jest.setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import "@testing-library/jest-dom";
66
import "@testing-library/jest-dom/jest-globals";
77
import "jest-axe/extend-expect";
8-
import { TextEncoder } from "util";
8+
import { TextEncoder, TextDecoder } from "util";
99
import { setProjectAnnotations } from "@storybook/react";
1010
import { defaultFallbackInView } from "react-intersection-observer";
1111
import {
@@ -46,6 +46,9 @@ afterEach(() => {
4646
});
4747

4848
global.TextEncoder = TextEncoder as typeof global.TextEncoder;
49+
if (typeof global.TextDecoder === "undefined") {
50+
global.TextDecoder = TextDecoder as typeof global.TextDecoder;
51+
}
4952

5053
// Jest doesn't like the top-level await in envVars.ts, so we mock it.
5154
jest.mock("./src/envVars", () => {

src/db/redis/util-mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
import Redis from "ioredis-mock";
66

77
export function createRedisMockInstance() {
8+
/* @c8 ignore next */
89
return new Redis();
910
}

0 commit comments

Comments
 (0)