UNPKG

minotor

Version:

A lightweight client-side transit routing library.

24 lines (20 loc) 547 B
import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { afterEach, beforeEach, describe } from 'node:test'; describe('timetable io', () => { let tempDir: string; let filePath: string; beforeEach(() => { tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-io-')); filePath = path.join(tempDir, 'test-timetable.bin'); }); afterEach(() => { if (fs.existsSync(filePath)) { fs.unlinkSync(filePath); } if (fs.existsSync(tempDir)) { fs.rmdirSync(tempDir); } }); });