forked from esy/esy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
38 lines (31 loc) · 1.02 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var isCi = require('is-ci');
var path = require('path');
var reporters = ['default'];
// Perhaps a bug in Jest - but resolution fails if
// we give it ["jest-junit"], so we'll resolve
// the complete path directly and pass it in.
let junitPath = require.resolve("jest-junit");
const isWindows = process.platform === 'win32';
if (isCi) {
reporters = reporters.concat([junitPath]);
}
var __ESY__base = path.join(__dirname, '_build', 'install', 'default', 'bin');
var __ESY__ = path.join(__ESY__base, 'esy');
if (isWindows) {
__ESY__ += ".exe";
}
process.env.PATH = __ESY__base + (isWindows ? ';': ':') + process.env.PATH;
module.exports = {
displayName: 'e2e:fast',
moduleFileExtensions: ['js'],
testMatch: ['<rootDir>/test-e2e/**/*.test.js'],
testEnvironment: 'node',
modulePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/test-e2e/build/fixtures/',
],
coverageReporters: ['text-summary', 'json', 'html', 'cobertura'],
reporters: reporters,
collectCoverage: isCi,
globals: {__ESY__: __ESY__}
};