Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghy2130 committed Oct 16, 2023
1 parent fc658c3 commit 19537d5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
11 changes: 7 additions & 4 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
module.exports = {
transform: {
"^.+\\.(js|jsx|ts|tsx)$": [
"ts-jest/presets/default-esm",
{
"ts-jest", {
useESM: true,
},
],
},
moduleDirectories: ['node_modules', '<rootDir>'],
extensionsToTreatAsEsm: ['.js', '.jsx', '.ts', '.tsx'],

// preset: 'ts-jest/presets/default-esm',
// resolver: 'ts-jest-resolver',

//moduleDirectories: ['node_modules', '<rootDir>'],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
testEnvironment: "jest-environment-jsdom",
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"jest-environment-jsdom": "^29.7.0",
"tailwindcss": "^3.3.3",
"ts-jest": "^29.1.1",
"ts-jest-resolver": "^2.0.1",
"typescript": "^5.1.6"
},
"engines": {
Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4762,7 +4762,7 @@ jest-resolve-dependencies@^29.7.0:
jest-regex-util "^29.6.3"
jest-snapshot "^29.7.0"

jest-resolve@^29.7.0:
jest-resolve@^29.5.0, jest-resolve@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30"
integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==
Expand Down Expand Up @@ -7106,6 +7106,7 @@ string-length@^4.0.1:
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
name string-width-cjs
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -7445,6 +7446,13 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

ts-jest-resolver@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ts-jest-resolver/-/ts-jest-resolver-2.0.1.tgz#4a1563cb10967e17eaae04157b0ba34e24d1c247"
integrity sha512-FolE73BqVZCs8/RbLKxC67iaAtKpBWx7PeLKFW2zJQlOf9j851I7JRxSDenri2NFvVH3QP7v3S8q1AmL24Zb9Q==
dependencies:
jest-resolve "^29.5.0"

ts-jest@^29.1.1:
version "29.1.1"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b"
Expand Down Expand Up @@ -7989,6 +7997,7 @@ which@^3.0.0:
isexe "^2.0.0"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

0 comments on commit 19537d5

Please sign in to comment.