@scafflater/jest-scafflater

0.0.4 • Public • Published

Jest Matchers to test generated templates.

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install --save-dev @scafflater/jest-scafflater

or, for installation with yarn package manager.

yarn add --dev @scafflater/jest-scafflater

Usage

Import @scafflater/jest-scafflater once (for instance in your tests setup file) and you're good to go:

// In your own jest-setup.js (or any other name)
import "@scafflater/jest-scafflater";

// In jest.config.js add (if you haven't already)
setupFilesAfterEnv: ["<rootDir>/jest-setup.js"];

With TypeScript

If you're using TypeScript, make sure your setup file is a .ts and not a .js to include the necessary types.

You will also need to include your setup file in your tsconfig.json if you haven't already:

  // In tsconfig.json
  "include": [
    ...
    "./jest-setup.ts"
  ],

Custom matchers

toBeEqualDir

toBeEqualDir();

Compare two directory structures, including file contents.

Readme

Keywords

Package Sidebar

Install

npm i @scafflater/jest-scafflater

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

31.4 kB

Total Files

35

Last publish

Collaborators

  • chicoribas