mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-21 06:37:36 -04:00
Clean up outdate jest and tsconfigs (#7712)
* inso * insomnia * testing * sdk * remove base and eslint configs * fix lock
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -12,4 +12,7 @@
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
module.exports = {
|
||||
collectCoverage: false,
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: false,
|
||||
},
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
resetMocks: true,
|
||||
resetModules: true,
|
||||
testEnvironment: 'node',
|
||||
testRegex: ['.+\\.test\\.tsx?$'],
|
||||
transform: { '^.+\\.tsx?$': 'ts-jest' },
|
||||
verbose: false,
|
||||
};
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -24178,7 +24178,6 @@
|
||||
"devDependencies": {
|
||||
"@grpc/grpc-js": "^1.10.10",
|
||||
"@grpc/proto-loader": "^0.7.13",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@playwright/test": "1.43.0",
|
||||
"@ravanallc/grpc-server-reflection": "^0.1.6",
|
||||
"@types/concurrently": "^6.4.0",
|
||||
@@ -24195,7 +24194,6 @@
|
||||
"faker": "^5.1.0",
|
||||
"graphql": "^16.8.1",
|
||||
"graphql-http": "^1.22.0",
|
||||
"jest": "^29.7.0",
|
||||
"oidc-provider": "^8.4.5",
|
||||
"uuid": "^9.0.1",
|
||||
"ws": "^8.16.0",
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
module.exports = {
|
||||
preset: '../../jest-preset.js',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: true,
|
||||
tsconfig: '../../tsconfig.base.json',
|
||||
},
|
||||
},
|
||||
collectCoverage: false,
|
||||
coveragePathIgnorePatterns: ['/node_modules/'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 80,
|
||||
functions: 96,
|
||||
lines: 95,
|
||||
statements: 95,
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'json',
|
||||
'jsx',
|
||||
'ts',
|
||||
'tsx',
|
||||
],
|
||||
resetMocks: true,
|
||||
resetModules: true,
|
||||
testEnvironment: 'node',
|
||||
testRegex: [
|
||||
'.+\\.test\\.tsx?$',
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
isolatedModules: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
verbose: false,
|
||||
preset: 'ts-jest',
|
||||
setupFiles: ['./src/jest/setup.ts'],
|
||||
};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { jest } from '@jest/globals';
|
||||
|
||||
export const cosmiconfigSync = () => ({
|
||||
load: jest.fn(),
|
||||
search: jest.fn(),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { jest } from '@jest/globals';
|
||||
|
||||
export const generate = jest.fn();
|
||||
export const generateToFile = jest.fn();
|
||||
export const runTests = jest.fn();
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"allowUnreachableCode": true,
|
||||
"allowUnusedLabels": false,
|
||||
"checkJs": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"pretty": true,
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"types": ["node"],
|
||||
"useUnknownInCatchVariables": false
|
||||
},
|
||||
"include": [
|
||||
".eslintrc.js",
|
||||
"esbuild.ts",
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest-preset.js',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: true,
|
||||
tsconfig: '../../tsconfig.base.json',
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'json',
|
||||
'jsx',
|
||||
'node',
|
||||
'ts',
|
||||
'tsx',
|
||||
],
|
||||
resetMocks: true,
|
||||
resetModules: true,
|
||||
testEnvironment: 'node',
|
||||
testRegex: [
|
||||
'.+\\.test\\.tsx?$',
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
isolatedModules: true,
|
||||
tsconfig: 'tsconfig.jest.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
verbose: false,
|
||||
preset: 'ts-jest',
|
||||
};
|
||||
|
||||
5
packages/insomnia-sdk/tsconfig.jest.json
Normal file
5
packages/insomnia-sdk/tsconfig.jest.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
module.exports = {
|
||||
preset: '../../jest-preset.js',
|
||||
};
|
||||
@@ -21,7 +21,6 @@
|
||||
"devDependencies": {
|
||||
"@grpc/grpc-js": "^1.10.10",
|
||||
"@grpc/proto-loader": "^0.7.13",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@playwright/test": "1.43.0",
|
||||
"@ravanallc/grpc-server-reflection": "^0.1.6",
|
||||
"@types/concurrently": "^6.4.0",
|
||||
@@ -38,7 +37,6 @@
|
||||
"graphql-http": "^1.22.0",
|
||||
"faker": "^5.1.0",
|
||||
"graphql": "^16.8.1",
|
||||
"jest": "^29.7.0",
|
||||
"oidc-provider": "^8.4.5",
|
||||
"uuid": "^9.0.1",
|
||||
"ws": "^8.16.0",
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": ".",
|
||||
},
|
||||
"include": [
|
||||
"**/*.d.ts",
|
||||
"cli",
|
||||
"core",
|
||||
"fixtures",
|
||||
"modules",
|
||||
"server",
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.test.ts",
|
||||
"dist",
|
||||
],
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.build.json",
|
||||
"compilerOptions": {
|
||||
"composite": false,
|
||||
"rootDir": ".",
|
||||
},
|
||||
"include": [
|
||||
"**/*.d.ts",
|
||||
".eslintrc.js",
|
||||
"__jest__",
|
||||
"cli",
|
||||
"fixtures",
|
||||
"jest.config.js",
|
||||
"playwright",
|
||||
"playwright.config.ts",
|
||||
"server",
|
||||
"tests",
|
||||
],
|
||||
"exclude": [
|
||||
"dist",
|
||||
],
|
||||
}
|
||||
@@ -1,11 +1,26 @@
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest-preset.js',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: true,
|
||||
tsconfig: '../../tsconfig.base.json',
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'json',
|
||||
'jsx',
|
||||
'ts',
|
||||
'tsx',
|
||||
],
|
||||
resetMocks: true,
|
||||
resetModules: true,
|
||||
testRegex: [
|
||||
'.+\\.test\\.tsx?$',
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
isolatedModules: true,
|
||||
tsconfig: 'tsconfig.jest.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
preset: 'ts-jest',
|
||||
};
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["DOM", "ES2019"],
|
||||
"lib": [
|
||||
"DOM",
|
||||
"ES2019"
|
||||
],
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitReturns": true,
|
||||
@@ -19,7 +22,9 @@
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"types": ["node"],
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"useUnknownInCatchVariables": false
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -2,29 +2,37 @@ const path = require('node:path');
|
||||
|
||||
/** @type { import('@jest/types').Config.InitialOptions } */
|
||||
module.exports = {
|
||||
preset: '../../jest-preset.js',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: true,
|
||||
},
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'json',
|
||||
'jsx',
|
||||
'ts',
|
||||
'tsx',
|
||||
],
|
||||
resetMocks: true,
|
||||
resetModules: true,
|
||||
testRegex: [
|
||||
'.+\\.test\\.tsx?$',
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
isolatedModules: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
preset: 'ts-jest',
|
||||
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,
|
||||
verbose: false,
|
||||
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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"allowUnreachableCode": true,
|
||||
"allowUnusedLabels": false,
|
||||
"checkJs": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"pretty": true,
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"useUnknownInCatchVariables": false,
|
||||
|
||||
"lib": ["DOM.Iterable", "DOM"],
|
||||
"isolatedModules": true,
|
||||
"jsx": "react",
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"include": [
|
||||
".eslintrc.js",
|
||||
"jest-preset.js",
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user