Skip to content

Tiny helper function to read JSON fixtures for tests

License

Notifications You must be signed in to change notification settings

zentered/read-fixtures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')
  ...
})

About

Tiny helper function to read JSON fixtures for tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published