mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
6a4eb6cb91
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
34 lines
896 B
TypeScript
34 lines
896 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
import { describe, it, test } from "@std/testing/bdd";
|
|
import { expect } from "./expect.ts";
|
|
|
|
Deno.test("expect.hasAssertions() API", () => {
|
|
describe("describe suite", () => {
|
|
// FIXME(eryue0220): This test should throw `toThrowErrorMatchingSnapshot`
|
|
it("should throw an error", () => {
|
|
expect.hasAssertions();
|
|
});
|
|
|
|
it("should pass", () => {
|
|
expect.hasAssertions();
|
|
expect("a").toEqual("a");
|
|
});
|
|
});
|
|
|
|
it("it() suite should pass", () => {
|
|
expect.hasAssertions();
|
|
expect("a").toEqual("a");
|
|
});
|
|
|
|
// FIXME(eryue0220): This test should throw `toThrowErrorMatchingSnapshot`
|
|
test("test suite should throw an error", () => {
|
|
expect.hasAssertions();
|
|
});
|
|
|
|
test("test suite should pass", () => {
|
|
expect.hasAssertions();
|
|
expect("a").toEqual("a");
|
|
});
|
|
});
|