Skip to content

Commit

Permalink
#1049@trivial: Fixes wrong english word for referring.
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn86 committed Sep 20, 2023
1 parent d7d4cc9 commit d4e2720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/global-registrator/src/GlobalRegistrator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GlobalWindow } from 'happy-dom';

const IGNORE_LIST = ['undefined', 'NaN', 'global', 'globalThis', 'window', 'globalThis'];
const SELF_REFERING = ['self', 'top', 'parent', 'window'];
const SELF_REFERRING = ['self', 'top', 'parent', 'window'];

/**
*
Expand All @@ -28,7 +28,7 @@ export default class GlobalRegistrator {
}
}

for (const key of SELF_REFERING) {
for (const key of SELF_REFERRING) {
this.registered[key] = undefined;
global[key] = global;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/global-registrator/test/react/React.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import ReactComponent from './ReactComponent.js';

const selfReferingProperties = ['self', 'top', 'parent', 'window'];
const selfReferringProperties = ['self', 'top', 'parent', 'window'];

// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const originalSetTimeout = global.setTimeout;
Expand Down Expand Up @@ -33,9 +33,9 @@ if (global.setTimeout === originalSetTimeout) {
throw Error('Happy DOM function not registered.');
}

for (const property of selfReferingProperties) {
for (const property of selfReferringProperties) {
if (global[property] !== global) {
throw Error('Self refering property property was not registered.');
throw Error('Self referring property property was not registered.');
}
}

Expand Down

0 comments on commit d4e2720

Please sign in to comment.