kibana/x-pack/plugins/apm/jest.config.js
Nathan L Smith 57c2555f27
Jest and Storybook fixes (#116132)
* Fix all broken stories
* In stories that were broken, add an associated Jest test so they if they break in the future we'll know
* Fix all console.error messages that were being printed during Jest test runs
* Add test setup which makes it so `console.error` throws an error so tests will fail if error console messages are printed
2021-10-26 07:25:01 -05:00

23 lines
779 B
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
const path = require('path');
module.exports = {
preset: '@kbn/test',
rootDir: path.resolve(__dirname, '../../..'),
roots: ['<rootDir>/x-pack/plugins/apm'],
setupFiles: [
'<rootDir>/x-pack/plugins/apm/jest_setup.js',
'<rootDir>/x-pack/plugins/apm/.storybook/jest_setup.js',
],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/apm',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/plugins/apm/{common,public,server}/**/*.{js,ts,tsx}',
],
};