forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
30 lines (28 loc) · 970 Bytes
/
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
/**
* Copyright IBM Corp. 2018, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = {
preset: 'jest-config-carbon',
collectCoverageFrom: [
'packages/**/src/**/*.js',
'!packages/{cli,components,sketch}/**',
'!packages/**/{examples,stories}/**',
'!**/*-story.js',
'!**/*.stories.js',
'!**/*-test.e2e.js',
],
moduleNameMapper: {
// This is a temporary workaround from moving to Jest v28. In this update,
// certain dependencies are only providing ESM through exports and so we use
// `require.resolve` to force CommonJS resolution
//
// @see https://jestjs.io/docs/upgrading-to-jest28#packagejson-exports
// @see https://github.com/microsoft/accessibility-insights-web/pull/5421#issuecomment-1109168149
nanoid: require.resolve('nanoid'),
},
reporters: ['default', 'jest-junit'],
};