Skip to content

Commit

Permalink
Fix tests (#2241)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Dec 21, 2023
1 parent 7f66a24 commit a943b3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rules/shared/abbreviations.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ module.exports.defaultReplacements = {
request: true,
},
res: {
resource: true,
response: true,
result: true,
resource: true,
},
ret: {
returnValue: true,
Expand Down
6 changes: 3 additions & 3 deletions test/prevent-abbreviations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ const tests = {
{
code: 'this.eResDir = 1',
options: checkPropertiesOptions,
errors: createErrors('Please rename the property `eResDir`. Suggested names are: `errorResponseDirection`, `errorResponseDirectory`, `errorResultDirection`, ... (5 more omitted). A more descriptive name will do too.'),
errors: createErrors('Please rename the property `eResDir`. Suggested names are: `errorResourceDirection`, `errorResourceDirectory`, `errorResponseDirection`, ... (9 more omitted). A more descriptive name will do too.'),
},

// All suggested names should avoid capture
Expand Down Expand Up @@ -767,7 +767,7 @@ const tests = {
},
{
code: 'class Res {}',
errors: createErrors('Please rename the variable `Res`. Suggested names are: `Response_`, `Result`. A more descriptive name will do too.'),
errors: createErrors('Please rename the variable `Res`. Suggested names are: `Resource`, `Response_`, `Result`. A more descriptive name will do too.'),
},
{
code: 'const Err = 1;',
Expand All @@ -787,7 +787,7 @@ const tests = {
{
code: '({Res: 1})',
options: checkPropertiesOptions,
errors: createErrors('Please rename the property `Res`. Suggested names are: `Response`, `Result`. A more descriptive name will do too.'),
errors: createErrors('Please rename the property `Res`. Suggested names are: `Resource`, `Response`, `Result`. A more descriptive name will do too.'),
},

{
Expand Down

0 comments on commit a943b3a

Please sign in to comment.