Skip to content

Commit

Permalink
Merge branch 'master' into 463-adds-support-for-xml-http-request
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/happy-dom/src/exception/DOMExceptionNameEnum.ts
#	packages/happy-dom/src/window/Window.ts
  • Loading branch information
Mas0nShi committed Jul 1, 2022
2 parents da34ce5 + 117595e commit 6fc77aa
Show file tree
Hide file tree
Showing 54 changed files with 15,639 additions and 683 deletions.
6 changes: 3 additions & 3 deletions packages/global-registrator/src/GlobalRegistrator.ts
Expand Up @@ -11,7 +11,7 @@ export default class GlobalRegistrator {
*/
public static register(): void {
if (this.registered.length) {
throw new Error('Failed to registered. Happy DOM has already been globally registered.');
throw new Error('Failed to register. Happy DOM has already been globally registered.');
}
const window = new GlobalWindow();
for (const key of Object.keys(window)) {
Expand All @@ -26,9 +26,9 @@ export default class GlobalRegistrator {
* Registers Happy DOM globally.
*/
public static unregister(): void {
if (this.registered.length) {
if (!this.registered.length) {
throw new Error(
'Failed to unregistered. Happy DOM has not previously been globally registered.'
'Failed to unregister. Happy DOM has not previously been globally registered.'
);
}
for (const key of this.registered) {
Expand Down
2 changes: 2 additions & 0 deletions packages/global-registrator/test/react/React.test.tsx
Expand Up @@ -26,3 +26,5 @@ function unmountReactComponent(): void {

mountReactComponent();
unmountReactComponent();

GlobalRegistrator.unregister();
4 changes: 2 additions & 2 deletions packages/happy-dom/.eslintrc.js
Expand Up @@ -34,12 +34,12 @@ const COMMON_CONFIG = {
'jsdoc/check-tag-names': WARN,
'jsdoc/check-types': WARN,
'jsdoc/implements-on-classes': WARN,
'jsdoc/match-description': WARN,
'jsdoc/match-description': OFF,
'jsdoc/newline-after-description': WARN,
'jsdoc/no-types': OFF,
'jsdoc/no-undefined-types': OFF,
'jsdoc/require-description': OFF,
'jsdoc/require-description-complete-sentence': WARN,
'jsdoc/require-description-complete-sentence': OFF,
'jsdoc/require-example': OFF,
'jsdoc/require-hyphen-before-param-description': [WARN, 'never'],
'jsdoc/require-param': WARN,
Expand Down

0 comments on commit 6fc77aa

Please sign in to comment.