From 27201dfee5b2cfe7e453d8cc655e8ec741837fef Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 05:06:21 +0000 Subject: [PATCH] refactor: replace builtin prototype method with `Object.prototype` equivalent It is preferable to call certain `Object.prototype` methods through `Object` on object instances instead of using the builtins directly. --- test/specs/headers.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/headers.spec.js b/test/specs/headers.spec.js index ffc725d5ff..0e96711b20 100644 --- a/test/specs/headers.spec.js +++ b/test/specs/headers.spec.js @@ -15,7 +15,7 @@ function testHeaderValue(headers, key, val) { if (!found) { if (typeof val === 'undefined') { - expect(headers.hasOwnProperty(key)).toEqual(false); + expect(Object.prototype.hasOwnProperty.call(headers, key)).toEqual(false); } else { throw new Error(key + ' was not found in headers'); }