-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: removed bable in favor of ts-jest
- Loading branch information
Showing
283 changed files
with
2,231 additions
and
3,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// eslint-disable-next-line n/no-extraneous-import | ||
import globals from 'globals'; | ||
import vonage from '@vonage/eslint-config'; | ||
|
||
export default [ | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
globals: { | ||
...globals.node, | ||
...globals.jest, | ||
} | ||
}, | ||
}, | ||
{ | ||
files: ['packages/*/lib/**/*.{ts,tsx}'], | ||
}, | ||
{ | ||
ignores: ['packages/*/dist/**/*.js', 'coverage/**'], | ||
}, | ||
...vonage.configs.typescript, | ||
...vonage.configs.jest, | ||
...vonage.configs.node, | ||
{ | ||
settings: { | ||
node: { | ||
version: '>=18.0.0', | ||
} | ||
}, | ||
rules: { | ||
// Leave this off. This rule cannot handle monorepos | ||
'n/no-missing-import': ['off'], | ||
'n/no-unsupported-features/es-builtins': [ | ||
'error', { | ||
'ignores': [] | ||
}] | ||
}, | ||
}, | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,140 +1,172 @@ | ||
// eslint-disable-next-line n/no-extraneous-import | ||
import type { Config } from '@jest/types'; | ||
|
||
const projectDefault = { | ||
testEnvironment: 'node', | ||
preset: 'ts-jest/presets/default-esm', | ||
moduleNameMapper: { | ||
'@vonage/(.+)': '<rootDir>/packages/$1/lib', | ||
}, | ||
}; | ||
|
||
const config: Config.InitialOptions = { | ||
extensionsToTreatAsEsm: ['.ts'], | ||
coverageDirectory: '<rootDir>/coverage/', | ||
coveragePathIgnorePatterns: [ | ||
'node_modules', | ||
'<rootDir>/testHelpers/*', | ||
'<rootDir>/packages/**/__tests__', | ||
], | ||
projects: [ | ||
{ | ||
...projectDefault, | ||
displayName: 'ACCOUNTS', | ||
testMatch: ['<rootDir>/packages/accounts/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'APPLICATIONS', | ||
testMatch: ['<rootDir>/packages/applications/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'AUDIT', | ||
testMatch: ['<rootDir>/packages/audit/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'AUTH', | ||
testMatch: ['<rootDir>/packages/auth/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'CONVERSATIONS', | ||
testMatch: ['<rootDir>/packages/conversations/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'JWT', | ||
testMatch: ['<rootDir>/packages/jwt/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'MEDIA', | ||
testMatch: ['<rootDir>/packages/media/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'MESSAGES', | ||
testMatch: ['<rootDir>/packages/messages/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'MEETINGS', | ||
testMatch: ['<rootDir>/packages/meetings/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'NUMBER INSIGHT V2', | ||
testMatch: [ | ||
'<rootDir>/packages/number-insight-v2/__tests__/**/*.test.ts', | ||
], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'NUMBER INSIGHTS', | ||
testMatch: ['<rootDir>/packages/number-insights/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'NUMBERS', | ||
testMatch: ['<rootDir>/packages/numbers/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'PRICING', | ||
testMatch: ['<rootDir>/packages/pricing/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'PROACTIVE CONNECT', | ||
testMatch: [ | ||
'<rootDir>/packages/proactive-connect/__tests__/**/*.test.ts', | ||
], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'REDACT', | ||
testMatch: ['<rootDir>/packages/redact/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'SERVER CLIENT', | ||
testMatch: ['<rootDir>/packages/server-client/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'SERVER SDK', | ||
testMatch: ['<rootDir>/packages/server-sdk/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'SMS', | ||
testMatch: ['<rootDir>/packages/sms/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'SUB ACCOUNTS', | ||
testMatch: ['<rootDir>/packages/subaccounts/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'USER', | ||
testMatch: ['<rootDir>/packages/users/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'VERIFY', | ||
testMatch: ['<rootDir>/packages/verify/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'VERIFY 2', | ||
testMatch: ['<rootDir>/packages/verify2/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'VIDEO', | ||
testMatch: ['<rootDir>/packages/video/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
{ | ||
...projectDefault, | ||
displayName: 'VOICE', | ||
testMatch: ['<rootDir>/packages/voice/__tests__/**/*.test.ts'], | ||
coveragePathIgnorePatterns: ['node_modules', '__tests__'], | ||
}, | ||
], | ||
moduleNameMapper: { | ||
'@vonage/(.+)': '<rootDir>/packages/$1/lib', | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.