Skip to content

Commit b005394

Browse files
committed
Add testing setup
1 parent ef8ce61 commit b005394

File tree

5 files changed

+13390
-6715
lines changed

5 files changed

+13390
-6715
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.eslintrc.js
22
dist
33
webpack.*.js
4+
jest.config.js

backend/message.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test("hello", () => {
2+
expect(0).toBe(0);
3+
});

jest.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
testEnvironment: "node",
3+
testMatch: [
4+
"<rootDir>/backend/**/__tests__/**/*.{ts,tsx}",
5+
"<rootDir>/backend/**/?(*.)(test).{ts,tsx}",
6+
],
7+
// SWC instead of ts-jest
8+
transform: {
9+
"^.+\\.(t|j)sx?$": ["@swc/jest"],
10+
},
11+
};

0 commit comments

Comments
 (0)