@@ -22,20 +22,28 @@ new RuleTester().run('lowercase-name-for-primitive', rule, {
22
22
] ,
23
23
invalid : [
24
24
{
25
- code : 'new errors.TypeError("ERR_INVALID_ARG_TYPE", "a", "Number")' ,
26
- errors : [ { message : 'primitive should use lowercase: Number' } ]
25
+ code : 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
26
+ '\'Number\')' ,
27
+ errors : [ { message : 'primitive should use lowercase: Number' } ] ,
28
+ output : 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
29
+ '\'number\')'
27
30
} ,
28
31
{
29
- code : 'new errors.TypeError("ERR_INVALID_ARG_TYPE", "a", "STRING")' ,
30
- errors : [ { message : 'primitive should use lowercase: STRING' } ]
32
+ code : 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
33
+ '\'STRING\')' ,
34
+ errors : [ { message : 'primitive should use lowercase: STRING' } ] ,
35
+ output : 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
36
+ '\'string\')'
31
37
} ,
32
38
{
33
- code : 'new errors.TypeError(" ERR_INVALID_ARG_TYPE", "a", ' +
34
- '[" String", " Number"]) ' ,
39
+ code : 'new errors.TypeError(\' ERR_INVALID_ARG_TYPE\', \'a\', ' +
40
+ '[\' String\', \' Number\']) ' ,
35
41
errors : [
36
42
{ message : 'primitive should use lowercase: String' } ,
37
43
{ message : 'primitive should use lowercase: Number' }
38
- ]
44
+ ] ,
45
+ output : 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
46
+ '[\'string\', \'number\']) '
39
47
}
40
48
]
41
49
} ) ;
0 commit comments