import { type Test } from './test/main.ts'; import { Group } from './group/main.ts'; import type { FilteringOptions } from './types.ts'; /** * Exposes the API to refine unwanted tests based upon applied * filters. * * @example * const refiner = new Refiner({ tags: ['@slow'] }) * refiner.allows('tags', ['@slow']) // true * refiner.allows('tags', ['@regression']) // false * * const refiner = new Refiner({ tags: [] }) * refiner.allows('tags', ['@slow']) // true * refiner.allows('tags', ['@regression']) // true */ export declare class Refiner { #private; constructor(filters?: FilteringOptions); /** * Enable/disable matching of all tags when filtering tests. * If "matchAll" is enabled, the test tags should match * all the user defined tags. * * Otherwise, any one match will pass the filter */ matchAllTags(state: boolean): this; /** * Pin a test to be executed. */ pinTest(test: Test): void; /** * Find if a test is pinned */ isPinned(test: Test): boolean; /** * Add a filter */ add(layer: 'tests' | 'tags' | 'groups', values: string[]): void; /** * Check if refiner allows a specific test or group to run by looking * at the applied filters */ allows(testOrGroup: Test | Group): boolean; }