aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShobhit Chittora <chittorashobhit@gmail.com>2017-12-17 16:11:34 +0530
committerWeijia Wang <381152119@qq.com>2017-12-26 13:51:53 +0800
commit639770c8d61572576d8b431802b904ff52b037ed (patch)
treeef3b5ca00f1f4961515b45212c724ceb189058a7 /test
parent8331f571edb27491161589f30e88962dfe436c2c (diff)
downloadandroid-node-v8-639770c8d61572576d8b431802b904ff52b037ed.tar.gz
android-node-v8-639770c8d61572576d8b431802b904ff52b037ed.tar.bz2
android-node-v8-639770c8d61572576d8b431802b904ff52b037ed.zip
tools: autofixer for lowercase-name-for-primitive
PR-URL: https://github.com/nodejs/node/pull/17715 Refs: https://github.com/nodejs/node/issues/16636 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-eslint-lowercase-name-for-primitive.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/parallel/test-eslint-lowercase-name-for-primitive.js b/test/parallel/test-eslint-lowercase-name-for-primitive.js
index f4a2ac7c3b..3eb0d83834 100644
--- a/test/parallel/test-eslint-lowercase-name-for-primitive.js
+++ b/test/parallel/test-eslint-lowercase-name-for-primitive.js
@@ -22,20 +22,28 @@ new RuleTester().run('lowercase-name-for-primitive', rule, {
],
invalid: [
{
- code: 'new errors.TypeError("ERR_INVALID_ARG_TYPE", "a", "Number")',
- errors: [{ message: 'primitive should use lowercase: Number' }]
+ code: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '\'Number\')',
+ errors: [{ message: 'primitive should use lowercase: Number' }],
+ output: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '\'number\')'
},
{
- code: 'new errors.TypeError("ERR_INVALID_ARG_TYPE", "a", "STRING")',
- errors: [{ message: 'primitive should use lowercase: STRING' }]
+ code: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '\'STRING\')',
+ errors: [{ message: 'primitive should use lowercase: STRING' }],
+ output: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '\'string\')'
},
{
- code: 'new errors.TypeError("ERR_INVALID_ARG_TYPE", "a",' +
- '["String", "Number"])',
+ code: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '[\'String\', \'Number\']) ',
errors: [
{ message: 'primitive should use lowercase: String' },
{ message: 'primitive should use lowercase: Number' }
- ]
+ ],
+ output: 'new errors.TypeError(\'ERR_INVALID_ARG_TYPE\', \'a\', ' +
+ '[\'string\', \'number\']) '
}
]
});