- Remove extensionsToTreatAsEsm from jest.config.js (not needed with type:module) - Add Jest globals to ESLint config (describe, it, expect, etc.) - Fix unnecessary escape characters in debug-token-403.js - Change no-useless-escape from error to warning
35 lines
594 B
JavaScript
35 lines
594 B
JavaScript
export default {
|
|
// Use Node's experimental ESM support
|
|
testEnvironment: 'node',
|
|
|
|
// Transform ES modules
|
|
transform: {},
|
|
|
|
// Module name mapper for ES modules
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
},
|
|
|
|
// Test match patterns
|
|
testMatch: [
|
|
'**/test/**/*.test.js',
|
|
'**/__tests__/**/*.js',
|
|
],
|
|
|
|
// Coverage configuration
|
|
collectCoverageFrom: [
|
|
'src/**/*.js',
|
|
'!src/**/*.test.js',
|
|
'!**/node_modules/**',
|
|
],
|
|
|
|
// Ignore patterns
|
|
testPathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/dist/',
|
|
],
|
|
|
|
// Verbose output
|
|
verbose: true,
|
|
};
|