Alias of it
it
Registers an individual test case.
The self type of the function to implement the test case
Rest
The test case
import { test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";test("a test case", () => { // test case assertEquals(2 + 2, 4);}); Copy
import { test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";test("a test case", () => { // test case assertEquals(2 + 2, 4);});
Ignore this test case.
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.ignore("should pass too", () => { assertEquals(3 + 4, 7); });}); Copy
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.ignore("should pass too", () => { assertEquals(3 + 4, 7); });});
Only execute this test case.
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.only("should pass too", () => { assertEquals(3 + 4, 7); });}); Copy
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.only("should pass too", () => { assertEquals(3 + 4, 7); });});
Skip this test case.
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.skip("should pass too", () => { assertEquals(3 + 4, 7); });}); Copy
import { describe, test } from "@std/testing/bdd";import { assertEquals } from "@std/assert";describe("example", () => { test("should pass", () => { assertEquals(2 + 2, 4); }); test.skip("should pass too", () => { assertEquals(3 + 4, 7); });});
Alias of
itRegisters an individual test case.