Skip to content

Commit

Permalink
Add ts-jest settings
Browse files Browse the repository at this point in the history
  • Loading branch information
HwangTaehyun committed Oct 3, 2022
1 parent 3809ffe commit 1e98bb3
Show file tree
Hide file tree
Showing 10 changed files with 8,923 additions and 3,826 deletions.
8 changes: 4 additions & 4 deletions api/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { renderStatsCard } from "@/src/cards/stats-card";
import blacklist from "@/src/common/blacklist";
import {
clampValue,
CONSTANTS,
isLocaleAvailable,
parseArray,
parseBoolean,
renderError,
} from "@/index.js";
import renderStatsCard from "@/src/cards/stats-card";
import blacklist from "@/src/common/blacklist";
} from "@/src/common/utils";
import fetchStats from "@/src/fetchers/stats-fetcher";
import { isLocaleAvailable } from "@/src/translations";
import * as dotenv from "dotenv";
import express from "express";

Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
presets: ["@babel/preset-env"],
};
14 changes: 13 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
export default {
transform: {
"^.+\\.[t|j]s$": [
"ts-jest",
{
useESM: true,
},
],
},
extensionsToTreatAsEsm: [".ts"],
clearMocks: true,
transform: {},
testEnvironment: "jsdom",
coverageProvider: "v8",
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/tests/e2e/"],
Expand All @@ -9,4 +17,8 @@ export default {
"<rootDir>/node_modules/",
"<rootDir>/tests/E2E/",
],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/$1",
},
modulePaths: ["<rootDir>"],
};
Loading

0 comments on commit 1e98bb3

Please sign in to comment.