0.2.1-alpha.9 • Published 7 years ago
jest-preset-edge v0.2.1-alpha.9
Jest Preset Edge - Advanced Frontend Focussed Jest Configuration
Features
- Supports CSS Modules using
identity-obj-proxy. - Mocks all asset file requirements for e.g. images, fonts, graphql files, ...
- Includes a mock for the native
fetch()method. - Polyfills
requestAnimationFrame()which is required by React v16. - Configures Date constructors to return a static data which is very helpful for snapshot testing.
- Integrates a mock for HTML5 canvas so that API calls does not throw inside NodeJS (via JSDOM).
Excludes for Coverage
- Excludes typical Edge Platform based application glue code files e.g.
Application.js,State.jsandInit.js. - Excludes Webpack and generic bundling/package entry points.
- Excludes Storybook stories following the
.story.jsnaming convention. - Excludes Jest tests following the
.test.jsnaming convention or being placed inside a__tests__folder.
Usage
Install via NPM:
npm install --save-dev jest-preset-edgeDefine the preset inside your own configuration. Official docs:
module.exports = {
"preset": "jest-preset-edge"
}This works in a jest.config.js or in the package.json file under the jest key.
License
Apache License Version 2.0, January 2004
Copyright
Copyright 2017-2018Sebastian Software GmbH
0.2.1-alpha.18
7 years ago
0.2.1-alpha.17
7 years ago
0.2.1-alpha.16
7 years ago
0.2.1-alpha.15
7 years ago
0.2.1-alpha.14
7 years ago
0.2.1-alpha.13
7 years ago
0.2.1-alpha.12
7 years ago
0.2.1-alpha.11
7 years ago
0.2.1-alpha.10
7 years ago
0.2.1-alpha.9
7 years ago