@@ -33,6 +33,16 @@ ruleTester.run('valid-params', rule, {
3333 'Promise.all(iterable)' ,
3434 'Promise.all([one, two, three])' ,
3535
36+ // valid Promise.allSettled()
37+ 'Promise.allSettled([])' ,
38+ 'Promise.allSettled(iterable)' ,
39+ 'Promise.allSettled([one, two, three])' ,
40+
41+ // valid Promise.any()
42+ 'Promise.any([])' ,
43+ 'Promise.any(iterable)' ,
44+ 'Promise.any([one, two, three])' ,
45+
3646 // valid Promise.then()
3747 'somePromise().then(success)' ,
3848 'somePromise().then(success, failure)' ,
@@ -129,6 +139,32 @@ ruleTester.run('valid-params', rule, {
129139 { message : 'Promise.all() requires 1 argument, but received 4' } ,
130140 ] ,
131141 } ,
142+ // invalid Promise.allSettled()
143+ {
144+ code : 'Promise.allSettled(1, 2, 3)' ,
145+ errors : [
146+ { message : 'Promise.allSettled() requires 1 argument, but received 3' } ,
147+ ] ,
148+ } ,
149+ {
150+ code : 'Promise.allSettled({}, function() {}, 1, 2)' ,
151+ errors : [
152+ { message : 'Promise.allSettled() requires 1 argument, but received 4' } ,
153+ ] ,
154+ } ,
155+ // invalid Promise.any()
156+ {
157+ code : 'Promise.any(1, 2, 3)' ,
158+ errors : [
159+ { message : 'Promise.any() requires 1 argument, but received 3' } ,
160+ ] ,
161+ } ,
162+ {
163+ code : 'Promise.any({}, function() {}, 1, 2)' ,
164+ errors : [
165+ { message : 'Promise.any() requires 1 argument, but received 4' } ,
166+ ] ,
167+ } ,
132168
133169 // invalid Promise.then()
134170 {
0 commit comments