Files
redocly-cli/jest.config.js
Roman Hotsiy 4d66ace6b8 fix: document openapi-core package usage + slightly improve the API (#1284)
* fix: document openapi-core package usage + slightly improve the API

* chore: fix tests

* Apply suggestions from code review

* docs: test code and add some explanations for each section

* fix: make the bundle output variables match in both examples

* chore: add tests for lint and bundle

* chore: add tests for bundleFromString and createConfig with a plugin

* chore: apply prettier

* Update packages/core/src/__tests__/bundle.test.ts

---------

Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com>
Co-authored-by: Andrew Tatomyr <andrew.tatomyr@redocly.com>
2023-10-15 23:38:40 +00:00

34 lines
707 B
JavaScript

module.exports = {
clearMocks: true,
restoreMocks: true,
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverageFrom: [
'packages/*/src/**/*.ts',
'!packages/**/__tests__/**/*',
'!packages/core/src/benchmark/**/*',
'!packages/cli/src/index.ts',
'!packages/cli/src/assert-node-version.ts',
],
coverageThreshold: {
'packages/core/': {
statements: 80,
branches: 71,
functions: 71,
lines: 80,
},
'packages/cli/': {
statements: 55,
branches: 48,
functions: 55,
lines: 55,
},
},
testMatch: ['**/__tests__/**/*.test.ts', '**/*.test.ts'],
globals: {
'ts-jest': {
diagnostics: false,
},
},
};