0.0.5 • Published 7 years ago

directory-snapshot v0.0.5

Weekly downloads
22
License
MIT
Repository
github
Last release
7 years ago

directory-snapshot

Given any directory, reads all files into memory so that it can be serialized as a snapshot (Jest or Ava). Useful for testing tools that write to the file system.

Use

import { execSync } from 'child_process';
import { dss } from 'directory-snapshot';

test('creates a new project', () => {
  execSync('my-tool-that-writes-to-fs new-project');
  expect(dss('./new-project')).toMatchSnapshot();
});

Install

yarn add directory-snapshot

License

MIT