Skip to content

Commit e05022c

Browse files
committed
Passing tests!
1 parent 587f688 commit e05022c

File tree

7 files changed

+4156
-17
lines changed

7 files changed

+4156
-17
lines changed

packages/sdk/jest.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
setupFiles: [
5+
"<rootDir>/jest.setup.js",
6+
],
7+
roots: [
8+
"<rootDir>/src",
9+
],
10+
testMatch: [
11+
"**/__tests__/**/*.ts",
12+
"**/?(*.)+(spec|test).ts",
13+
],
14+
moduleFileExtensions: [
15+
"ts",
16+
"js",
17+
],
18+
transform: {
19+
// '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
20+
// '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
21+
"^.+\\.tsx?$": [
22+
"ts-jest",
23+
{
24+
tsconfig: "tsconfig.node.json",
25+
},
26+
],
27+
},
28+
};

packages/sdk/jest.setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const fetchMock = require("jest-fetch-mock");
2+
fetchMock.enableMocks();
3+
global.fetch = fetchMock;

0 commit comments

Comments
 (0)