import { ITestBase } from '../common/mod.ts'; import { assertEquals, assertExists, assertInstanceOf, AssertionError, assertNotEquals, assertStrictEquals, } from 'https://deno.land/std/assert/mod.ts'; class TestBase implements ITestBase { test(name: string, fn: () => void): void { return Deno.test(name, fn); } assertEquals(actual: unknown, expected: unknown): void { return assertEquals(actual, expected); } assertStrictEquals(actual: unknown, expected: unknown) { return assertStrictEquals(actual, expected); } assertNotEquals(actual: unknown, expected: unknown): void { return assertNotEquals(actual, expected); } assertExists(actual: unknown, msg?: string): void { return assertExists(actual, msg); } assertInstanceOf(actual: unknown, expectedType: any): void { return assertInstanceOf(actual, expectedType); } assertTrue(actual: boolean): void { if (actual !== true) { throw new AssertionError(`actual: "${actual}" expected to be true"`); } } assertFalse(actual: boolean): void { if (actual !== false) { throw new AssertionError(`actual: "${actual}" expected to be false"`); } } } const testBase = new TestBase(); export default testBase;