Allow simple form of valid test case in ruletester (#32559)

This commit is contained in:
Benjamin Lichtman
2019-01-28 12:29:45 -08:00
committed by Pranav Senthilnathan
parent 739ed3b1cf
commit 680362adbb
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -539,4 +539,12 @@ ruleTester.run('my-rule', rule, {
]
});
ruleTester.run('simple-valid-test', rule, {
valid: [
'foo',
'bar',
{ code: 'foo', options: [{ allowFoo: true }] },
]
});
//#endregion
+1 -1
View File
@@ -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;