The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/message-parser/jest.config.ts

18 lines
646 B

import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import server from '@rocket.chat/jest-presets/server';
import type { Config } from 'jest';
// Jest 30 loads this config via Node's native type stripping (Node 22.18+),
// which treats the file as ESM where __dirname is not defined as a global.
const __dirname = dirname(fileURLToPath(import.meta.url));
export default {
preset: server.preset,
transform: {
'\\.pegjs$': resolve(__dirname, './loaders/pegtransform.js'),
},
moduleFileExtensions: ['js', 'ts', 'pegjs'],
testPathIgnorePatterns: ['/node_modules/', '\\.bench\\.ts$'],
} satisfies Config;