Skip to content

Commit a943b3a

Browse files
authored
Fix tests (#2241)
1 parent 7f66a24 commit a943b3a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rules/shared/abbreviations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ module.exports.defaultReplacements = {
180180
request: true,
181181
},
182182
res: {
183+
resource: true,
183184
response: true,
184185
result: true,
185-
resource: true,
186186
},
187187
ret: {
188188
returnValue: true,

test/prevent-abbreviations.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ const tests = {
271271
{
272272
code: 'this.eResDir = 1',
273273
options: checkPropertiesOptions,
274-
errors: createErrors('Please rename the property `eResDir`. Suggested names are: `errorResponseDirection`, `errorResponseDirectory`, `errorResultDirection`, ... (5 more omitted). A more descriptive name will do too.'),
274+
errors: createErrors('Please rename the property `eResDir`. Suggested names are: `errorResourceDirection`, `errorResourceDirectory`, `errorResponseDirection`, ... (9 more omitted). A more descriptive name will do too.'),
275275
},
276276

277277
// All suggested names should avoid capture
@@ -767,7 +767,7 @@ const tests = {
767767
},
768768
{
769769
code: 'class Res {}',
770-
errors: createErrors('Please rename the variable `Res`. Suggested names are: `Response_`, `Result`. A more descriptive name will do too.'),
770+
errors: createErrors('Please rename the variable `Res`. Suggested names are: `Resource`, `Response_`, `Result`. A more descriptive name will do too.'),
771771
},
772772
{
773773
code: 'const Err = 1;',
@@ -787,7 +787,7 @@ const tests = {
787787
{
788788
code: '({Res: 1})',
789789
options: checkPropertiesOptions,
790-
errors: createErrors('Please rename the property `Res`. Suggested names are: `Response`, `Result`. A more descriptive name will do too.'),
790+
errors: createErrors('Please rename the property `Res`. Suggested names are: `Resource`, `Response`, `Result`. A more descriptive name will do too.'),
791791
},
792792

793793
{

0 commit comments

Comments
 (0)