scroll/src/common/types.ts

29 lines
1002 B
JavaScript

// ----------------------------------------------------------------------------
// General types
// ----------------------------------------------------------------------------
export interface IPoint {
x: number;
y: number;
}
// ----------------------------------------------------------------------------
// Testing
// ----------------------------------------------------------------------------
/**
* The shared test interface, so tests can be run by both runtimes
*/
export interface ITestBase {
assertEquals(actual: unknown, expected: unknown): void;
assertExists(actual: unknown): void;
assertFalse(actual: boolean): void;
assertInstanceOf(actual: unknown, expectedType: any): void;
assertNotEquals(actual: unknown, expected: unknown): void;
assertStrictEquals(actual: unknown, expected: unknown): void;
assertTrue(actual: boolean): void;
test(name: string, fn: () => void, timeout?: number): void;
testGroup(name: string, fn: () => void): void;
testSuite(testObj: any): void;
}