Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/socifi/jest-config
SOCIFI Default Jest Configuration
https://github.com/socifi/jest-config
jest test-config
Last synced: 2 days ago
JSON representation
SOCIFI Default Jest Configuration
- Host: GitHub
- URL: https://github.com/socifi/jest-config
- Owner: socifi
- License: apache-2.0
- Created: 2018-02-07T12:18:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:28:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T22:40:46.692Z (11 days ago)
- Topics: jest, test-config
- Language: JavaScript
- Size: 1.86 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SOCIFI Default Jest Configuration
[![npm version](https://badge.fury.io/js/%40socifi%2Fjest-config.svg)](https://badge.fury.io/js/%40socifi%2Fjest-config)
[![CircleCI](https://circleci.com/gh/socifi/jest-config/tree/master.svg?style=shield)](https://circleci.com/gh/socifi/jest-config/tree/master)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:
```nodemon
npm install @socifi/jest-config --save-dev
```Then create your jest.config.js file:
```javascript
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:
```javascript
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.