insomnia/packages/insomnia/jest.config.js
Filipe Freire 9800ad5aee
chore: use npm workspaces (herecles) (#6193)
* chore: use npm workspaces

* edit workspaces

* fix

* fix

* force workspace order

* fix lock?

* define max_old_space_size on CI

* rm unnecessary bootstrap

* fix

* cleanup package.json

* bump vite and re-add build to bootstrap

* define paths on tsconfig

* fix some things

* add mocha to vite config

* bump mocha

* remove tsconfigs and project refs

* cache npm install

* fixed types

* assing repo root

* merge lint configs

* fix clean

* fix tests

* setup node

* lockfile

* fix bump

* fix lint markdown

* temporary disable inso tests

* dont use rimraf

* simplify clean

* fix version

* lockfile

* inso build

* fix lint

* lock file

* remove cleans

* remove unused

* tslib hack

* redownload node-libcurl

* rm version from scripts

* fix extrainfo bug

* use npm version

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2023-08-10 00:14:16 +02:00

31 lines
1.1 KiB
JavaScript

const path = require('node:path');
/** @type { import('@jest/types').Config.InitialOptions } */
module.exports = {
preset: '../../jest-preset.js',
globals: {
'ts-jest': {
isolatedModules: true,
},
},
cache: false,
modulePathIgnorePatterns: ['./src/network/.*/__mocks__'],
transformIgnorePatterns: ['/node_modules/(?!(@getinsomnia/api-client)/)'],
setupFiles: ['./src/__jest__/setup.ts'],
setupFilesAfterEnv: ['./src/__jest__/setup-after-env.ts'],
testEnvironment: 'jsdom',
verbose: true,
moduleNameMapper: {
'\\.(css|less|png|svg)$': '<rootDir>/src/__mocks__/dummy.ts',
'styled-components': path.join(__dirname, '../../node_modules/styled-components'),
'jsonpath-plus': path.join(__dirname, '../../node_modules/jsonpath-plus/dist/index-node-cjs.cjs'),
},
collectCoverage: !!process.env.CI,
collectCoverageFrom: ['src/account/**/*.ts', 'src/common/**/*.ts', 'src/main/**/*.ts', 'src/models/**/*.ts', 'src/network/**/*.ts', 'src/sync/**/*.ts', 'src/templating/**/*.ts', 'src/utils/**/*.ts'],
coverageThreshold: {
global: {
lines: 35,
},
},
};