quasqui
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
12 lines (9 loc) • 327 B
text/typescript
import { mergeRegex } from '../src/utils/mergeRegex';
describe('mergeRegex', () => {
it('should merge regexp correctly', () => {
expect(mergeRegex(/\.js$/, /\.ts$/)).toEqual(/\.js$|\.ts$/);
});
it('should merge string correctly', () => {
expect(mergeRegex('\\.js$', '\\.ts$')).toEqual(/\.js$|\.ts$/);
});
});