Skip to content

Commit

Permalink
chore: add usage
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Dec 25, 2023
1 parent 7c4605d commit a22cfdf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# 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')
...
})
```

0 comments on commit a22cfdf

Please sign in to comment.