tools: fix object name in prefer-assert-methods.js

PR-URL: https://github.com/nodejs/node/pull/37544
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Tobias Nießen 2021-02-28 02:37:51 +01:00 committed by James M Snell
parent 03942caf10
commit 54bb7e3bff
No known key found for this signature in database
GPG Key ID: 7341B15C070877AC

View File

@ -12,7 +12,7 @@ function parseError(method, op) {
return `'assert.${method}' should be used instead of '${op}'`;
}
const preferedAssertMethod = {
const preferredAssertMethod = {
'===': 'strictEqual',
'!==': 'notStrictEqual',
'==': 'equal',
@ -23,7 +23,7 @@ module.exports = function(context) {
return {
[astSelector]: function(node) {
const arg = node.expression.arguments[0];
const assertMethod = preferedAssertMethod[arg.operator];
const assertMethod = preferredAssertMethod[arg.operator];
if (assertMethod) {
context.report({
node,