Function it

  • Registers an individual test case.

    Type Parameters

    • T

      The self type of the function to implement the test case

    Parameters

    • Rest...args: ItArgs<T>

      The test case

    Returns void

    import { describe, it } from "@std/testing/bdd";
    import { assertEquals } from "@std/assert";

    describe("example", () => {
    it("should pass", () => {
    // test case
    assertEquals(2 + 2, 4);
    });
    });

Methods

Methods

  • Ignore this test case.

    Type Parameters

    • T

    Parameters

    • Rest...args: ItArgs<T>

      The test case

    Returns void

    import { describe, it } from "@std/testing/bdd";
    import { assertEquals } from "@std/assert";

    describe("example", () => {
    it("should pass", () => {
    assertEquals(2 + 2, 4);
    });

    it.ignore("should pass too", () => {
    assertEquals(3 + 4, 7);
    });
    });
  • Only execute this test case.

    Type Parameters

    • T

    Parameters

    • Rest...args: ItArgs<T>

      The test case

    Returns void

    import { describe, it } from "@std/testing/bdd";
    import { assertEquals } from "@std/assert";

    describe("example", () => {
    it("should pass", () => {
    assertEquals(2 + 2, 4);
    });

    it.only("should pass too", () => {
    assertEquals(3 + 4, 7);
    });
    });
  • Skip this test case.

    Type Parameters

    • T

    Parameters

    • Rest...args: ItArgs<T>

      The test case

    Returns void

    import { describe, it } from "@std/testing/bdd";
    import { assertEquals } from "@std/assert";

    describe("example", () => {
    it("should pass", () => {
    assertEquals(2 + 2, 4);
    });

    it.skip("should pass too", () => {
    assertEquals(3 + 4, 7);
    });
    });