Skip to main content

RegExp test

Betterer ships several built-in tests to get you started. Check out the implementations for inspiration for your own tests!

@betterer/regexp

Use this test to incrementally remove RegExp matches from your codebase.

import { regexp } from '@betterer/regexp';

export default {
'no hack comments': () => regexp(/(\/\/\s*HACK)/i).include('**/*.ts')
};

@betterer/regexp is a BettererFileTest, so you can use include, exclude, only, and skip.