Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 372 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 372 Bytes

read-fixtures

Tiny helper function to read JSON fixtures for tests

npm install @zentered/read-fixtures

Usage

import { test, mock } from 'node:test'
import assert from 'node:assert/strict'
import readFixture from '@zentered/read-fixtures'

test('process events', async () => {
  const mockData = await readFixture('log_stream.json')
  ...
})