Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @socifi/jest-config with all npm packages installed. Try it out:

var jestConfig = require("@socifi/jest-config")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@socifi/jest-config v2.3.1

SOCIFI default jest config

SOCIFI Default Jest Configuration

npm version CircleCI

This is default configuration for jest that test our javascript libraries.

What is included

Jest packages with junit reporter. It uses babel to parse ECMAScript 6.

All tests results are generated to tests_results folder. Default folders:

  • ./tests - For your test code. All files should be in format *.test.js
  • ./src - Your source code
  • ./dist - Your compiled source code.

How to use it

First, install this package:

npm install @socifi/jest-config --save-dev

Then create your jest.config.js file:

module.exports = require('@socifi/jest-config')();

This will test your code in src directory and it will generate junit.xml file and coverage report.

If you want to test your build files, use:

module.exports = require('@socifi/jest-config')('build');

Coverage tests are skipped and junit tests will generate junit-bundle.xml file. During the tests all your links to src folder will be replace with link to dist folder.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free