mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Allow simple form of valid test case in ruletester (#32559)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
739ed3b1cf
commit
680362adbb
@@ -539,4 +539,12 @@ ruleTester.run('my-rule', rule, {
|
||||
]
|
||||
});
|
||||
|
||||
ruleTester.run('simple-valid-test', rule, {
|
||||
valid: [
|
||||
'foo',
|
||||
'bar',
|
||||
{ code: 'foo', options: [{ allowFoo: true }] },
|
||||
]
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
Vendored
+1
-1
@@ -540,7 +540,7 @@ export class RuleTester {
|
||||
name: string,
|
||||
rule: Rule.RuleModule,
|
||||
tests: {
|
||||
valid?: RuleTester.ValidTestCase[];
|
||||
valid?: Array<string | RuleTester.ValidTestCase>;
|
||||
invalid?: RuleTester.InvalidTestCase[];
|
||||
},
|
||||
): void;
|
||||
|
||||
Reference in New Issue
Block a user