Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit 26809c5

Browse files
committed
test: use toBeTypeOf method
1 parent a868b68 commit 26809c5

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

test/chat-bot.test.ts

+9-16
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@ describe("ChatBot", async () => {
77
const bot = new ChatBot(config);
88
await bot.create();
99

10-
test("should response a question", async () => {
11-
const res = await bot.askAsync("What is Vue.js?");
12-
expect(res).toMatchInlineSnapshot(`
13-
"[1]: https://www.javatpoint.com/vue-js \\"Vue.js Tutorial - javatpoint\\"
14-
[2]: https://v2.vuejs.org/v2/guide/index.html \\"Introduction — Vue.js\\"
15-
[3]: https://vuejs.org/ \\"Vue.js - The Progressive JavaScript Framework | Vue.js\\"
16-
[4]: https://vuejs.org/guide/introduction.html \\"Introduction | Vue.js\\"
17-
[5]: https://v2.vuejs.org/ \\"Vue.js\\"
18-
19-
Vue.js is a **progressive framework for building user interfaces**[^1^][1] [^2^][2] using JavaScript. It is **easy to integrate** with other projects and libraries[^1^][1] and can be used to develop **single-page applications**[^1^][1].
20-
21-
Are you interested in learning more about Vue.js? 😊
22-
"
23-
`)
24-
bot.close();
25-
},{timeout: 100000});
10+
test(
11+
"should response a question",
12+
async () => {
13+
const res = await bot.askAsync("What is Vue.js?");
14+
expect(res).toBeTypeOf("string");
15+
bot.close();
16+
},
17+
{ timeout: 100000 }
18+
);
2619
});

0 commit comments

Comments
 (0)