teleport/jest.config.js
Rafał Cieślak 8446ad4c63
Improve agent log processing (no cut off logs + close event instead of exit) (#30941)
* Avoid chunking agent output too much with stripAnsiStream

* Use close event rather than exit event to signal process exit

* Do not include process logs when logging agent state update

* Log attempt at killing agent before it happens, not after

That is because terminateWithTimeout might end up not killing the agent
in the end if the process failed to spawn.

* Fix AgentRunner test
2023-09-14 15:09:49 +00:00

26 lines
740 B
JavaScript

const config = require('@gravitational/build/jest/config');
process.env.TZ = 'UTC';
const esModules = ['strip-ansi', 'ansi-regex'].join('|');
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
...config,
globals: {
electron: {},
},
collectCoverageFrom: [
// comment out until shared directory is finished testing
// '**/packages/design/src/**/*.jsx',
'**/packages/shared/components/**/*.jsx',
],
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
coverageReporters: ['text-summary', 'lcov'],
testPathIgnorePatterns: ['e2e'],
setupFilesAfterEnv: [
'<rootDir>/web/packages/shared/setupTests.tsx',
'<rootDir>/web/packages/build/jest/customMatchers.ts',
],
};