Skip to content

Instantly share code, notes, and snippets.

@IlyaGershman
IlyaGershman / interview_test_helpers.ts
Last active October 14, 2024 02:07
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,