Interface it

Registers an individual test case.

interface it {
    constructor: any;
    ignore<T>(...args: ItArgs<T>): void;
    only<T>(...args: ItArgs<T>): void;
    skip<T>(...args: ItArgs<T>): void;
    ignore<T>(...args: ItArgs<T>): void;
    only<T>(...args: ItArgs<T>): void;
    skip<T>(...args: ItArgs<T>): void;
    <T>(...args: ItArgs<T>): void;
}

Constructors

Methods

Constructors

constructor: any

Methods

  • Registers an individual test case with ignore set to true.

    Type Parameters

    • T

    Parameters

    Returns void

  • Registers an individual test case with only set to true.

    Type Parameters

    • T

    Parameters

    Returns void

  • Registers an individual test case with ignore set to true. Alias of .ignore().

    Type Parameters

    • T

    Parameters

    Returns void

  • 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);
    });
    });