Skip to content

Instantly share code, notes, and snippets.

@bfunc
bfunc / interview_test_helpers.ts
Created October 4, 2024 08:12 — forked from IlyaGershman/interview_test_helpers.ts
This is a small set of functions to help you write simple tests without frameworks
type Config = {
logPerformance?: boolean;
timeout?: number; // Timeout in milliseconds
};
function createTestRunner(initialConfig?: Config) {
let globalConfig: Config = {
logPerformance: false,
timeout: 5000,
...initialConfig,