We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The 3 tests in this example would all have the same name and thus cause an error when running ava.
import test from "ava"; import RuleTester from "eslint-ava-rule-tester"; import { name, rule } from "./path/to/rule"; const ruleTester = new RuleTester(test, { /* ... */ }); const filename = "file.ts"; const code = "// some code"; ruleTester.run(name, rule, { valid: [ { filename, code, options: [{ flag1: true }], }, { filename, code, options: [{ flag2: true }], } ], invalid: [ { filename, code, options: [{ flag1: true, flag2: true }], errors: [ // ... ], } ], });
The text was updated successfully, but these errors were encountered:
Workaround:
test
const testNames = new Map(); function testWrapper(title: string, callback: Implementation<unknown>) { const count = (testNames.get(title) ?? 0) + 1; testNames.set(title, count); return test(`${title} - ${count}`, callback); }
RuleTester
const ruleTester = new RuleTester(testWrapper, { /* ... */ });
Sorry, something went wrong.
Fixed by #27
No branches or pull requests
The 3 tests in this example would all have the same name and thus cause an error when running ava.
The text was updated successfully, but these errors were encountered: