Skip to main content

TSQuery test

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


Use this test to incrementally remove TSQuery matches from your codebase. See the TSQuery documentation for more details about the query syntax.

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

export default {
'no raw console.log': () =>
tsquery('CallExpression > PropertyAccessExpression["console"]["log"]').include(

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