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
- Host: GitHub
- URL: https://github.com/zentered/read-fixtures
- Owner: zentered
- License: mit
- Created: 2023-12-25T22:50:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T20:38:55.000Z (almost 2 years ago)
- Last Synced: 2025-04-02T23:05:58.790Z (about 1 year ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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')
...
})
```