Registers an individual test case.
The self type of the function to implement the test case
Rest
The test case
import { describe, it } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { it("should pass", () => { // test case assertEquals(2 + 2, 4); });}); Copy
import { describe, it } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { it("should pass", () => { // test case assertEquals(2 + 2, 4); });});
Ignore this test case.
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); });}); Copy
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.
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); });}); Copy
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.
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); });}); Copy
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); });});
Registers an individual test case.