Skip to content

Commit e2b3628

Browse files
authored
chore: Jest config in TypeScript format (#2777)
1 parent 77971ed commit e2b3628

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

jest.config.js renamed to jest.config.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
module.exports = {
1+
// eslint-disable-next-line node/no-extraneous-import
2+
import type { Config } from '@jest/types'
3+
4+
const config: Config.InitialOptions = {
25
preset: 'ts-jest',
36
testMatch: process.env.VITE_TEST_BUILD
47
? ['**/playground/**/*.spec.[jt]s?(x)']
@@ -18,3 +21,5 @@ module.exports = {
1821
}
1922
}
2023
}
24+
25+
export default config

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"sirv": "^1.0.10",
4747
"slash": "^3.0.0",
4848
"ts-jest": "^26.4.4",
49+
"ts-node": "^9.1.1",
4950
"typescript": "^4.1.2",
5051
"vitepress": "^0.12.2",
5152
"yorkie": "^2.0.0"

yarn.lock

+34-2
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,11 @@ anymatch@^3.0.3, anymatch@~3.1.1:
14741474
normalize-path "^3.0.0"
14751475
picomatch "^2.0.4"
14761476

1477+
arg@^4.1.0:
1478+
version "4.1.3"
1479+
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
1480+
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
1481+
14771482
argparse@^1.0.7, argparse@~1.0.9:
14781483
version "1.0.10"
14791484
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -2428,6 +2433,11 @@ cosmiconfig@^7.0.0:
24282433
path-type "^4.0.0"
24292434
yaml "^1.10.0"
24302435

2436+
create-require@^1.1.0:
2437+
version "1.1.1"
2438+
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
2439+
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
2440+
24312441
cross-env@^7.0.3:
24322442
version "7.0.3"
24332443
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
@@ -2675,6 +2685,11 @@ diff-sequences@^26.6.2:
26752685
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
26762686
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
26772687

2688+
diff@^4.0.1:
2689+
version "4.0.2"
2690+
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
2691+
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
2692+
26782693
dir-glob@^3.0.1:
26792694
version "3.0.1"
26802695
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -5150,7 +5165,7 @@ make-dir@^3.0.0:
51505165
dependencies:
51515166
semver "^6.0.0"
51525167

5153-
5168+
[email protected], make-error@^1.1.1:
51545169
version "1.3.6"
51555170
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
51565171
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
@@ -7102,7 +7117,7 @@ source-map-resolve@^0.5.0:
71027117
source-map-url "^0.4.0"
71037118
urix "^0.1.0"
71047119

7105-
source-map-support@^0.5.19, source-map-support@^0.5.6, source-map-support@~0.5.19:
7120+
source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@^0.5.6, source-map-support@~0.5.19:
71067121
version "0.5.19"
71077122
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
71087123
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
@@ -7667,6 +7682,18 @@ ts-jest@^26.4.4:
76677682
semver "7.x"
76687683
yargs-parser "20.x"
76697684

7685+
ts-node@^9.1.1:
7686+
version "9.1.1"
7687+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
7688+
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
7689+
dependencies:
7690+
arg "^4.1.0"
7691+
create-require "^1.1.0"
7692+
diff "^4.0.1"
7693+
make-error "^1.1.1"
7694+
source-map-support "^0.5.17"
7695+
yn "3.1.1"
7696+
76707697
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0:
76717698
version "1.14.1"
76727699
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -8192,6 +8219,11 @@ yauzl@^2.10.0:
81928219
buffer-crc32 "~0.2.3"
81938220
fd-slicer "~1.1.0"
81948221

8222+
8223+
version "3.1.1"
8224+
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
8225+
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
8226+
81958227
yorkie@^2.0.0:
81968228
version "2.0.0"
81978229
resolved "https://registry.yarnpkg.com/yorkie/-/yorkie-2.0.0.tgz#92411912d435214e12c51c2ae1093e54b6bb83d9"

0 commit comments

Comments
 (0)