Skip to content

Commit 592119d

Browse files
committed
02 テストがびっくりするぐらい動かない node:testも全然動かず
1 parent fd184ec commit 592119d

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.mocharc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extension": ["ts"],
3+
"spec": [
4+
"test/**/*.spec.ts",
5+
"lib/**/tests/**/*.spec.ts"
6+
],
7+
"node-option": [
8+
"experimental-specifier-resolution=node",
9+
"loader=ts-node/esm",
10+
"no-warnings"
11+
]
12+
}

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@line/bot-sdk",
33
"version": "__LINE_BOT_SDK_NODEJS_VERSION__",
44
"description": "Node.js SDK for LINE Messaging API",
5+
"type": "module",
56
"engines": {
67
"node": ">=18"
78
},
@@ -80,12 +81,5 @@
8081
"sourceMap": true,
8182
"instrument": true
8283
},
83-
"mocha": {
84-
"require": "ts-node/register",
85-
"spec": [
86-
"test/**/*.spec.ts",
87-
"lib/**/tests/**/*.spec.ts"
88-
]
89-
},
9084
"license": "Apache-2.0"
9185
}

tsconfig.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es2017",
3+
"module": "NodeNext",
4+
"moduleResolution": "NodeNext",
5+
"esModuleInterop": true,
6+
"target": "ES2018",
57
"noImplicitAny": true,
8+
"newLine": "LF",
9+
"sourceMap": true,
10+
"declarationMap": true,
611
"outDir": "dist",
712
"rootDirs": ["lib", "test"],
813
"declaration": true,
914
},
1015
"include": [
1116
"lib/**/*.ts",
12-
]
17+
],
18+
"exclude": [
19+
"node_modules",
20+
"dist",
21+
".git"
22+
],
1323
}

0 commit comments

Comments
 (0)