Package Exports
- stdstream-snapshot
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stdstream-snapshot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stdstream-snapshot
Tiny util for CLI testing: fetch stdout, stderr streams and match data to snapshot
Install
yarn add stdstream-snapshot -D
npm add stdstream-snapshot -DUsage
import {process} from 'stdstream-snapshot'
it('cmd output matches to spapshot', () => {
const cmd = 'somecmd --flag=foo -b'
const target = './test/snapshots/some-cmd-output.json'
expect(process({
cmd,
target,
update: true
})).toBeTruthy()
})