@currents/rules
v0.1.0
Published
Matches tests against Currents actions
Readme
@currents/rules
Matches tests against Currents actions: skip, quarantine and tag.
The Currents reporters fetch the actions of a project and use this package to find the actions that match each test. Each reporter then applies the matched actions in its own way.
import { RulesEvalBase } from '@currents/rules';
const rules = new RulesEvalBase(actions);
const matched = rules.getMatchedRulesGroupedByType({
title: 'logs in',
titlePath: ['login.spec.ts', 'auth', 'logs in'],
file: 'login.spec.ts',
project: 'chromium',
testId: 'abc123',
tag: ['@smoke'],
errors: [{ message: 'Timed out' }],
});
// { quarantine: [...], tag: [...] }