fix cypress compatibility
parent
29f69945e5
commit
60f0a13959
|
|
@ -1,5 +1,5 @@
|
|||
import cluster from 'node:cluster';
|
||||
import hasOwn from 'object.hasown';
|
||||
import cluster from 'cluster';
|
||||
import Debug from 'debug';
|
||||
const debug = Debug('lot-occupancy-system:polyfills');
|
||||
export function applyPolyfills() {
|
||||
|
|
@ -7,7 +7,8 @@ export function applyPolyfills() {
|
|||
debug('Applying Object.hasOwn(o, v) polyfill');
|
||||
Object.hasOwn = hasOwn;
|
||||
}
|
||||
if (!Object.hasOwn(cluster, 'setupPrimary') && Object.hasOwn(cluster, 'setupMaster')) {
|
||||
if (!Object.hasOwn(cluster, 'setupPrimary') &&
|
||||
Object.hasOwn(cluster, 'setupMaster')) {
|
||||
debug('Applying cluster.setupPrimary() polyfill');
|
||||
cluster.setupPrimary = cluster.setupMaster;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import cluster from 'node:cluster'
|
||||
import hasOwn from 'object.hasown'
|
||||
|
||||
// eslint-disable-next-line unicorn/prefer-node-protocol
|
||||
import cluster from 'cluster'
|
||||
|
||||
import Debug from 'debug'
|
||||
const debug = Debug('lot-occupancy-system:polyfills')
|
||||
|
||||
|
|
@ -10,7 +12,10 @@ export function applyPolyfills(): void {
|
|||
Object.hasOwn = hasOwn
|
||||
}
|
||||
|
||||
if (!Object.hasOwn(cluster, 'setupPrimary') && Object.hasOwn(cluster, 'setupMaster')) {
|
||||
if (
|
||||
!Object.hasOwn(cluster, 'setupPrimary') &&
|
||||
Object.hasOwn(cluster, 'setupMaster')
|
||||
) {
|
||||
debug('Applying cluster.setupPrimary() polyfill')
|
||||
cluster.setupPrimary = cluster.setupMaster
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue