From 494ca30619906866fdc5a71d2418a3ed2e6fe532 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Thu, 24 Feb 2022 21:50:24 +0900 Subject: [PATCH] fix test name --- templates/promise/promise.test.js | 8 ++++---- templates/scope/scope.test.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/promise/promise.test.js b/templates/promise/promise.test.js index ccc923c..f8e94bf 100644 --- a/templates/promise/promise.test.js +++ b/templates/promise/promise.test.js @@ -3,21 +3,21 @@ // ダミー const fetchData = () => Promise.resolve("peanut butter"); -test("the data is peanut butter", () => { +test("the data is peanut butter - return promise", () => { return fetchData().then((data) => { expect(data).toBe("peanut butter"); }); }); -test("the data is peanut butter", () => { +test("the data is peanut butter - return promise with resolves", () => { return expect(fetchData()).resolves.toBe("peanut butter"); }); -test("the data is peanut butter", async () => { +test("the data is peanut butter - async/await", async () => { const data = await fetchData(); expect(data).toBe("peanut butter"); }); -test("the data is peanut butter", async () => { +test("the data is peanut butter - async/await with resolves", async () => { await expect(fetchData()).resolves.toBe("peanut butter"); }); diff --git a/templates/scope/scope.test.js b/templates/scope/scope.test.js index 5d358da..a3f48da 100644 --- a/templates/scope/scope.test.js +++ b/templates/scope/scope.test.js @@ -4,11 +4,11 @@ beforeAll(() => console.log("1 - beforeAll")); afterAll(() => console.log("1 - afterAll")); beforeEach(() => console.log("1 - beforeEach")); afterEach(() => console.log("1 - afterEach")); -test("", () => console.log("1 - test")); +test("1 - test", () => console.log("1 - test")); describe("Scoped / Nested block", () => { beforeAll(() => console.log("2 - beforeAll")); afterAll(() => console.log("2 - afterAll")); beforeEach(() => console.log("2 - beforeEach")); afterEach(() => console.log("2 - afterEach")); - test("", () => console.log("2 - test")); + test("2 - test", () => console.log("2 - test")); });