diff --git a/tests/integration/hooks/after_all_test.ts b/tests/integration/hooks/after_all_test.ts index d0852717..5758b250 100644 --- a/tests/integration/hooks/after_all_test.ts +++ b/tests/integration/hooks/after_all_test.ts @@ -7,16 +7,17 @@ import { Rhum } from "../../../mod.ts"; let suite_val = "Ed"; let case_val = 22; -Rhum.testPlan("app_test.ts", () => { +Rhum.testPlan("after_all_test.ts", () => { + Rhum.afterAll(() => { suite_val = "Eric"; }); // Run the first test suite - Rhum.testSuite("run()", () => { + Rhum.testSuite("test suite 1", () => { Rhum.afterAll(() => { case_val = 2; }); - Rhum.testCase("Returns true", () => { + Rhum.testCase("hooks properly set suite_val and case_val", () => { // Asserting that the suite val should not have been changed by the hook (yet) Rhum.asserts.assertEquals(suite_val, "Ed"); // Revert it back for the next test that uses it @@ -24,18 +25,18 @@ Rhum.testPlan("app_test.ts", () => { // Assert the value is kept the same (hook hasn't ran yet) Rhum.asserts.assertEquals(case_val, 22); }); - Rhum.testCase("Returns false", () => { + Rhum.testCase("hooks properly set case_val", () => { // Assert the value has changes as the hook should have ran Rhum.asserts.assertEquals(case_val, 2); }); }); // Run the second test suite - Rhum.testSuite("close()", () => { + Rhum.testSuite("test suite 2", () => { Rhum.afterAll(() => { case_val = 0; }); - Rhum.testCase("Returns true", async () => { + Rhum.testCase("hooks properly set suite_val and case_val", async () => { // Asserting the hook should have replaced the name Rhum.asserts.assertEquals(suite_val, "Eric"); suite_val = "Ed"; diff --git a/tests/integration/hooks/after_each_test.ts b/tests/integration/hooks/after_each_test.ts index afdad43b..6d411d39 100644 --- a/tests/integration/hooks/after_each_test.ts +++ b/tests/integration/hooks/after_each_test.ts @@ -7,16 +7,17 @@ import { Rhum } from "../../../mod.ts"; let suite_val = "Ed"; let case_val = 22; -Rhum.testPlan("app_test.ts", () => { +Rhum.testPlan("after_each_test.ts", () => { + Rhum.afterEach(() => { suite_val = "Eric"; }); // Run the first test suite - Rhum.testSuite("run()", () => { + Rhum.testSuite("test suite 1", () => { Rhum.afterEach(() => { case_val = 2; }); - Rhum.testCase("Returns true", () => { + Rhum.testCase("hooks properly set suite_val and case_val", () => { // Asserting that the suite val should not have been changed by the hook (yet) Rhum.asserts.assertEquals(suite_val, "Ed"); // Revert it back for the next test that uses it @@ -31,11 +32,11 @@ Rhum.testPlan("app_test.ts", () => { }); // Run the second test suite - Rhum.testSuite("close()", () => { + Rhum.testSuite("test suite 2", () => { Rhum.afterEach(() => { case_val = 0; }); - Rhum.testCase("Returns true", async () => { + Rhum.testCase("hooks properly set suite_val and case_val", async () => { // Asserting the hook should have replaced the name Rhum.asserts.assertEquals(suite_val, "Eric"); suite_val = "Ed"; diff --git a/tests/integration/hooks/before_all_test.ts b/tests/integration/hooks/before_all_test.ts index 46c2efd0..4672a0ef 100644 --- a/tests/integration/hooks/before_all_test.ts +++ b/tests/integration/hooks/before_all_test.ts @@ -8,6 +8,7 @@ let suite_val = "Ed"; let case_val = 22; Rhum.testPlan("before_all_test.ts", () => { + Rhum.beforeAll(() => { suite_val = "Eric"; }); diff --git a/tests/integration/hooks/before_each_test.ts b/tests/integration/hooks/before_each_test.ts index c40f8b2e..af39d76d 100644 --- a/tests/integration/hooks/before_each_test.ts +++ b/tests/integration/hooks/before_each_test.ts @@ -7,7 +7,8 @@ import { Rhum } from "../../../mod.ts"; let suite_val = "Ed"; let case_val = 22; -Rhum.testPlan("before_each_test.", () => { +Rhum.testPlan("before_each_test.ts", () => { + Rhum.beforeEach(() => { suite_val = "Eric"; });