turris-test-helpers

0.1.4 • Public • Published

Turris.js test environment helpers

Provides a simple way to create an environment for testing React.js components writter with ES6 without browser.

Includes things

  • jsdom with localStorage polyfill for all your DOM needs
  • React and TestUtils (exposed via mocha context)
  • Container for rendering your component that is create before each test and disposed afterwards (exposed via mocha context)
  • Should.js for your assertions (exposed as default module export)

Installation

Package can be installed using NPM:
npm install turris-test-helpers

Usage

It is recommended to import this file in the beginning of your test, e.g.:
import should from 'turris-test-helpers'

License

MIT

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i turris-test-helpers

    Weekly Downloads

    2

    Version

    0.1.4

    License

    MIT

    Last publish

    Collaborators

    • yamalight