Skip to content

Commit 62fbec4

Browse files
author
Hyunje Jun
committed
Disable ts-node cache on test
1 parent 2344314 commit 62fbec4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"scripts": {
1616
"pretest": "npm run build",
17-
"test": "API_BASE_URL=http://localhost:1234/ TEST_PORT=1234 mocha -r ts-node/register test/*.spec.ts",
17+
"test": "API_BASE_URL=http://localhost:1234/ TEST_PORT=1234 TS_NODE_CACHE=0 mocha -r ts-node/register test/*.spec.ts",
1818
"prettier": "prettier --parser typescript --trailing-comma all '{lib,test}/**/*.ts'",
1919
"format": "npm run prettier -- --write",
2020
"format:check": "npm run prettier -- -l",

test/client.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe("client", () => {
8383
it("getGroupMemberIds", () => {
8484
return client
8585
.getGroupMemberIds("test_group_id")
86-
.then(ids =>
86+
.then((ids: string[]) =>
8787
deepEqual(ids, [
8888
"group-test_group_id-0",
8989
"group-test_group_id-1",
@@ -101,7 +101,7 @@ describe("client", () => {
101101
it("getRoomMemberIds", () => {
102102
return client
103103
.getRoomMemberIds("test_room_id")
104-
.then(ids =>
104+
.then((ids: string[]) =>
105105
deepEqual(ids, [
106106
"room-test_room_id-0",
107107
"room-test_room_id-1",
@@ -119,8 +119,8 @@ describe("client", () => {
119119
it("getMessageContent", () => {
120120
return client
121121
.getMessageContent("test_message_id")
122-
.then(s => getStreamData(s))
123-
.then(data => {
122+
.then((s: NodeJS.ReadableStream) => getStreamData(s))
123+
.then((data: string) => {
124124
const res = JSON.parse(data);
125125
equal(res.headers.authorization, "Bearer test_channel_access_token");
126126
equal(res.path, "/message/test_message_id/content");
@@ -129,7 +129,7 @@ describe("client", () => {
129129
});
130130

131131
it("leaveGroup", () => {
132-
return client.leaveGroup("test_group_id").then(res => {
132+
return client.leaveGroup("test_group_id").then((res: any) => {
133133
equal(res.headers.authorization, "Bearer test_channel_access_token");
134134
equal(res.path, "/group/test_group_id/leave");
135135
equal(res.method, "POST");

0 commit comments

Comments
 (0)