0.0.4 • Published 1 year ago
uvu-inline-snapshot v0.0.4
uvu-inline-snapshot
Minimal Inline Snapshot utility for uvu/assert
Installation
npm i uvu uvu-inline-snapshot
Usage
const { test } = require('uvu')
const { inlineSnapshot } = require('uvu-inline-snapshot')
const add = (x, y) => x + y
test('example 1', async () => {
await inlineSnapshot(add(1, 2), '')
})
test.run()
// --------------------
// will be converted to
const { test } = require('uvu')
const { inlineSnapshot } = require('uvu-inline-snapshot')
const add = (x, y) => x + y
test('example 1', async () => {
await inlineSnapshot(add(1, 2), '3') // Filled for you
})
test.run()