fix(simulator): fix mocha tests
[e-mobility-charging-stations-simulator.git] / src / utils / Utils.ts
index 8a66d92d2cde25db89f225c0d6e0742adee45ae7..f701cea041ab831d1b1ff323123e02c60b69b11b 100644 (file)
@@ -3,7 +3,8 @@ import util from 'node:util';
 
 import clone from 'just-clone';
 
-import { Constants } from './internal';
+// import { Constants } from './internal';
+import { Constants } from './Constants';
 import { WebSocketCloseEventStatusString } from '../types';
 
 export class Utils {
@@ -185,10 +186,8 @@ export class Utils {
     return clone<T>(object);
   }
 
-  public static objectHasOwnProperty(object: unknown, property: string): boolean {
-    return (
-      Utils.isObject(object) && (Object.prototype.hasOwnProperty.call(object, property) as boolean)
-    );
+  public static hasOwnProp(object: unknown, property: PropertyKey): boolean {
+    return Utils.isObject(object) && Object.hasOwn(object as object, property);
   }
 
   public static isCFEnvironment(): boolean {