Wondering what’s next for npm?Check out our public roadmap! »

jest-preset-preact

4.0.2 • Public • Published

jest-preset-preact

Jest preset containing all required configuration for writing tests for preact.

Features:

  • Transpiles JSX to h()
  • Aaliases for "react" imports to point to preact/compat
  • Automatically serialize Preact VNodes in snapshots
  • Stub style imports (.css, .less, .sass/scss, etc)
  • Add typeahead preview for filtering in jest's watch mode

Usage

Install it via npm or yarn:

npm install --save-dev jest-preset-preact
# or via yarn 
yarn add -D jest-preset-preact

...and add the preset to your jest.config.js file.

// jest.config.js
module.exports = {
    preset: 'jest-preset-preact',
};

License

MIT, see the LICENSE file.

Keywords

none

Install

npm i jest-preset-preact

DownloadsWeekly Downloads

5,199

Version

4.0.2

License

MIT

Unpacked Size

5.69 kB

Total Files

8

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar