JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q67655F
  • License MIT

Util for CLI testing: fetch stdout, stderr streams and match data to snapshot

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

Build Status npm (tag) dependencyStatus Maintainability Test Coverage

Tiny util for CLI testing: fetch stdout, stderr streams and match data to snapshot

Install

yarn add stdstream-snapshot -D
npm add stdstream-snapshot -D

Usage

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()
})