From d4e27208253cb0dbd94f4919887d4e219a2b87c1 Mon Sep 17 00:00:00 2001 From: David Ortner Date: Thu, 21 Sep 2023 00:56:05 +0200 Subject: [PATCH] #1049@trivial: Fixes wrong english word for referring. --- packages/global-registrator/src/GlobalRegistrator.ts | 4 ++-- packages/global-registrator/test/react/React.test.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/global-registrator/src/GlobalRegistrator.ts b/packages/global-registrator/src/GlobalRegistrator.ts index af5ab5ca6..2c08baf9f 100644 --- a/packages/global-registrator/src/GlobalRegistrator.ts +++ b/packages/global-registrator/src/GlobalRegistrator.ts @@ -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']; /** * @@ -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; } diff --git a/packages/global-registrator/test/react/React.test.tsx b/packages/global-registrator/test/react/React.test.tsx index f504d1f0e..bc00d1352 100644 --- a/packages/global-registrator/test/react/React.test.tsx +++ b/packages/global-registrator/test/react/React.test.tsx @@ -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; @@ -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.'); } }