Skip to main content
Module

x/mock/test_shared.ts

Utilities to help mock behavior, spy on function calls, stub methods, and fake time for tests.
Very Popular
Go to Latest
File
export class Point { constructor(public x: number, public y: number) {} // deno-lint-ignore no-explicit-any action(...args: any[]): any { return args[0]; } toString(): string { return [this.x, this.y].join(", "); } *[Symbol.iterator](): IterableIterator<number> { yield this.x; yield this.y; }}
export function stringifyPoint(point: Point) { return point.toString();}