Completed
Push — master ( c12867...9cb664 )
by Junior
28s
created

scripts/test.js   A

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 27
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
wmc 3
c 1
b 0
f 1
nc 2
mnd 1
bc 2
fnc 1
dl 0
loc 27
rs 10
bpm 2
cpm 3
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test.js ➔ ??? 0 3 1
1
'use strict';
2
3
// Do this as the first thing so that any code reading it knows the right env.
4
process.env.BABEL_ENV = 'test';
5
process.env.NODE_ENV = 'test';
6
process.env.PUBLIC_URL = '';
7
8
// Makes the script crash on unhandled rejections instead of silently
9
// ignoring them. In the future, promise rejections that are not handled will
10
// terminate the Node.js process with a non-zero exit code.
11
process.on('unhandledRejection', err => {
12
  throw err;
13
});
14
15
// Ensure environment variables are read.
16
require('../config/env');
17
18
const jest = require('jest');
19
const argv = process.argv.slice(2);
20
21
// Watch unless on CI or in coverage mode
22
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
23
  argv.push('--watch');
24
}
25
26
27
jest.run(argv);
28