An open API service indexing awesome lists of open source software.

https://github.com/zentered/read-fixtures

Tiny helper function to read JSON fixtures for tests
https://github.com/zentered/read-fixtures

Last synced: about 1 year ago
JSON representation

Tiny helper function to read JSON fixtures for tests

Awesome Lists containing this project

README

          

# read-fixtures

Tiny helper function to read JSON fixtures for tests

```bash
npm install @zentered/read-fixtures
```

## Usage

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