forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (29 loc) · 995 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
31
/**
* Copyright IBM Corp. 2018, 2023
*
* 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/**/src/**/*.tsx',
'!packages/{cli,components}/**',
'!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'],
};