Repository: capricorn86/happy-dom
Pull request #279 (2021-05-22 19:08:18)

Task/275 add owner document and owner element to attr interface


Patch:
diff --git a/package.json b/package.json
index 7541d083..bc0b3542 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,8 @@
 		"compile": "lerna run compile",
 		"watch": "lerna run watch --parallel",
 		"lint": "lerna run lint",
-		"lint:changed": "lerna run lint --since HEAD",
+		"lint:fix": "lerna run lint:fix",
+		"lint:changed": "lerna run lint:fix --since HEAD",
 		"validate-commit-messages": "node ./bin/validate-commit-messages.js",
 		"generate-release-notes": "node ./bin/generate-release-notes.js",
 		"print-latest-version": "node ./bin/print-latest-version.js",
diff --git a/packages/global-registrator/.eslintrc.js b/packages/global-registrator/.eslintrc.js
index 69771315..a5b589ba 100644
--- a/packages/global-registrator/.eslintrc.js
+++ b/packages/global-registrator/.eslintrc.js
@@ -1,1 +1,1 @@
-module.exports = require('happy-dom/.eslintrc');
\ No newline at end of file
+module.exports = require('happy-dom/.eslintrc');
diff --git a/packages/global-registrator/package.json b/packages/global-registrator/package.json
index 36c5c787..5814c394 100644
--- a/packages/global-registrator/package.json
+++ b/packages/global-registrator/package.json
@@ -26,7 +26,8 @@
 	"scripts": {
 		"compile": "tsc",
 		"watch": "npm run compile && tsc -w --preserveWatchOutput",
-		"lint": "eslint --max-warnings 0 --fix './src/**/*.ts'",
+		"lint": "eslint --ignore-path .gitignore --max-warnings 0 .",
+		"lint:fix": "eslint --ignore-path .gitignore --max-warnings 0 --fix .",
 		"test": "tsc --project ./test && node ./tmp/react/React.test.js",
 		"test:debug": "tsc --project ./test && node --inspect-brk ./tmp/react/React.test.js"
 	},
diff --git a/packages/happy-dom/.eslintrc.js b/packages/happy-dom/.eslintrc.js
index 3b20b403..6c91853c 100644
--- a/packages/happy-dom/.eslintrc.js
+++ b/packages/happy-dom/.eslintrc.js
@@ -18,7 +18,7 @@ const COMMON_CONFIG = {
 		'wrap-iife': OFF,
 		'no-self-assign': ERROR,
 		'no-self-compare': ERROR,
-		'no-loop-func': WARN,
+		'no-loop-func': OFF,
 		'array-callback-return': ERROR,
 		curly: ERROR,
 		'no-fallthrough': OFF,
@@ -57,7 +57,7 @@ const COMMON_CONFIG = {
 			WARN,
 			{
 				mustMatch: {
-					describe: '^[A-Z][a-zA-Z0-9]+$|^[a-z][a-zA-Z0-9]+\\(\\)$',
+					// Describe: '^[A-Z][a-zA-Z0-9]+$|^[a-z][a-zA-Z0-9]+\\(\\)$',
 					it: '^[A-Z](.+).$'
 				}
 			}
diff --git a/packages/happy-dom/package.json b/packages/happy-dom/package.json
index c81c441c..228c80c6 100644
--- a/packages/happy-dom/package.json
+++ b/packages/happy-dom/package.json
@@ -25,7 +25,8 @@
 	"scripts": {
 		"compile": "tsc",
 		"watch": "tsc -w --preserveWatchOutput",
-		"lint": "eslint --max-warnings 0 --fix './src/**/*.ts'",
+		"lint": "eslint --ignore-path .gitignore --max-warnings 0 .",
+		"lint:fix": "eslint --ignore-path .gitignore --max-warnings 0 --fix .",
 		"test": "jest",
 		"test:coverage": "jest --collectCoverage",
 		"test:watch": "jest --watch",
diff --git a/packages/happy-dom/src/attribute/Attr.ts b/packages/happy-dom/src/attribute/Attr.ts
index b9a5ac87..eea007c4 100644
--- a/packages/happy-dom/src/attribute/Attr.ts
+++ b/packages/happy-dom/src/attribute/Attr.ts
@@ -1,11 +1,31 @@
+import IDocument from '../nodes/document/IDocument';
+import IElement from '../nodes/element/IElement';
+
 /**
- * Attr node interface.
+ * Attribute node interface.
+ *
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/Attr.
  */
 export default class Attr {
 	public value: string = null;
 	public name: string = null;
 	public namespaceURI: string = null;
 
+	/**
+	 * @deprecated
+	 */
+	public readonly ownerElement: IElement = null;
+
+	/**
+	 * @deprecated
+	 */
+	public readonly ownerDocument: IDocument = null;
+
+	/**
+	 * @deprecated
+	 */
+	public readonly specified = true;
+
 	/**
 	 * Returns local name.
 	 *
diff --git a/packages/happy-dom/src/nodes/document/Document.ts b/packages/happy-dom/src/nodes/document/Document.ts
index d711d5e5..0c8759fa 100644
--- a/packages/happy-dom/src/nodes/document/Document.ts
+++ b/packages/happy-dom/src/nodes/document/Document.ts
@@ -615,6 +615,7 @@ export default class Document extends Node implements IDocument {
 	public createAttribute(name: string): Attr {
 		const attribute = new Attr();
 		attribute.name = name.toLowerCase();
+		(<IDocument>attribute.ownerDocument) = this;
 		return attribute;
 	}
 
@@ -629,6 +630,7 @@ export default class Document extends Node implements IDocument {
 		const attribute = new Attr();
 		attribute.namespaceURI = namespaceURI;
 		attribute.name = qualifiedName;
+		(<IDocument>attribute.ownerDocument) = this;
 		return attribute;
 	}
 
diff --git a/packages/happy-dom/src/nodes/element/Element.ts b/packages/happy-dom/src/nodes/element/Element.ts
index de26b44d..4ce9a6c9 100644
--- a/packages/happy-dom/src/nodes/element/Element.ts
+++ b/packages/happy-dom/src/nodes/element/Element.ts
@@ -248,7 +248,9 @@ export default class Element extends Node implements IElement {
 		const clone = <Element | IElement>super.cloneNode(deep);
 
 		for (const key of Object.keys(this._attributes)) {
-			(<Element>clone)._attributes[key] = Object.assign(new Attr(), this._attributes[key]);
+			const attr = Object.assign(new Attr(), this._attributes[key]);
+			(<IElement>attr.ownerElement) = clone;
+			(<Element>clone)._attributes[key] = attr;
 		}
 
 		if (deep) {
@@ -691,6 +693,8 @@ export default class Element extends Node implements IElement {
 		const oldValue = replacedAttribute ? replacedAttribute.value : null;
 
 		attribute.name = name;
+		(<IElement>attribute.ownerElement) = this;
+		(<IDocument>attribute.ownerDocument) = this.ownerDocument;
 
 		this._attributes[name] = attribute;
 
diff --git a/packages/jest-environment/.eslintrc.js b/packages/jest-environment/.eslintrc.js
index 69771315..a5b589ba 100644
--- a/packages/jest-environment/.eslintrc.js
+++ b/packages/jest-environment/.eslintrc.js
@@ -1,1 +1,1 @@
-module.exports = require('happy-dom/.eslintrc');
\ No newline at end of file
+module.exports = require('happy-dom/.eslintrc');
diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json
index a1ea186d..bb3286b5 100644
--- a/packages/jest-environment/package.json
+++ b/packages/jest-environment/package.json
@@ -27,7 +27,8 @@
 	"scripts": {
 		"compile": "node ./bin/build-lit-ts-config && tsc --project tmp/tsconfig.lit-element.json && tsc --project tmp/tsconfig.lit-html.json && tsc",
 		"watch": "npm run compile && tsc -w --preserveWatchOutput",
-		"lint": "eslint --max-warnings 0 --fix './src/**/*.ts'",
+		"lint": "eslint --ignore-path .gitignore --max-warnings 0 .",
+		"lint:fix": "eslint --ignore-path .gitignore --max-warnings 0 --fix .",
 		"test": "jest",
 		"test:watch": "jest --runInBand --watch",
 		"test:update-snapshot": "jest --runInBand --updateSnapshot",
diff --git a/packages/server-rendering/.eslintrc.js b/packages/server-rendering/.eslintrc.js
index 69771315..a5b589ba 100644
--- a/packages/server-rendering/.eslintrc.js
+++ b/packages/server-rendering/.eslintrc.js
@@ -1,1 +1,1 @@
-module.exports = require('happy-dom/.eslintrc');
\ No newline at end of file
+module.exports = require('happy-dom/.eslintrc');
diff --git a/packages/server-rendering/package.json b/packages/server-rendering/package.json
index 3fb2b905..91afa41e 100644
--- a/packages/server-rendering/package.json
+++ b/packages/server-rendering/package.json
@@ -27,7 +27,8 @@
 	"scripts": {
 		"compile": "tsc",
 		"watch": "tsc -w --preserveWatchOutput",
-		"lint": "eslint --max-warnings 0 --fix './src/**/*.ts'",
+		"lint": "eslint --ignore-path .gitignore --max-warnings 0 .",
+		"lint:fix": "eslint --ignore-path .gitignore --max-warnings 0 --fix .",
 		"test": "jest",
 		"test:watch": "jest --watch",
 		"test:update-snapshot": "jest --updateSnapshot",


Test patch:
diff --git a/packages/global-registrator/test/react/ReactComponent.tsx b/packages/global-registrator/test/react/ReactComponent.tsx
index a143a841..af2218fa 100644
--- a/packages/global-registrator/test/react/ReactComponent.tsx
+++ b/packages/global-registrator/test/react/ReactComponent.tsx
@@ -1,5 +1,8 @@
 import React from 'react';
 
+/**
+ *
+ */
 export default class ReactComponent extends React.Component<{}, void> {
 	/**
 	 * @override
diff --git a/packages/happy-dom/test/CustomElement.ts b/packages/happy-dom/test/CustomElement.ts
index 95b3fa62..f372c4a6 100644
--- a/packages/happy-dom/test/CustomElement.ts
+++ b/packages/happy-dom/test/CustomElement.ts
@@ -4,13 +4,13 @@ import Window from '../src/window/Window';
  * CustomElement test class.
  */
 export default class CustomElement extends new Window().HTMLElement {
-	public changedAttributes = [];
 	public static observedAttributesCallCount = 0;
+	public changedAttributes = [];
 
 	/**
 	 * Returns a list of observed attributes.
 	 *
-	 * @return Observered attributes.
+	 * @returns Observered attributes.
 	 */
 	public static get observedAttributes(): string[] {
 		this.observedAttributesCallCount++;
diff --git a/packages/happy-dom/test/css/CSSParser.test.ts b/packages/happy-dom/test/css/CSSParser.test.ts
index 0cf7f01e..87d74039 100644
--- a/packages/happy-dom/test/css/CSSParser.test.ts
+++ b/packages/happy-dom/test/css/CSSParser.test.ts
@@ -8,7 +8,7 @@ import CSSKeyframesRule from '../../src/css/rules/CSSKeyframesRule';
 
 describe('CSSParser', () => {
 	describe('parseFromString()', () => {
-		test('Parses CSS into an Array of CSSRule.', () => {
+		it('Parses CSS into an Array of CSSRule.', () => {
 			const cssStyleSheet = new CSSStyleSheet();
 			const cssRules = CSSParser.parseFromString(cssStyleSheet, CSSParserInput);
 
diff --git a/packages/happy-dom/test/css/CSSStyleDeclaration.test.ts b/packages/happy-dom/test/css/CSSStyleDeclaration.test.ts
index 8480cc84..7e0aac77 100644
--- a/packages/happy-dom/test/css/CSSStyleDeclaration.test.ts
+++ b/packages/happy-dom/test/css/CSSStyleDeclaration.test.ts
@@ -17,14 +17,14 @@ describe('CSSStyleDeclaration', () => {
 
 	for (const property of CSSStyleDeclarationStyleProperties) {
 		describe(`get ${property}()`, () => {
-			test('Returns style property.', () => {
+			it('Returns style property.', () => {
 				attributes.style.value = `${CAMEL_TO_KEBAB_CASE(property)}: test;`;
 				expect(cssStyleDeclaration[property]).toBe('test');
 			});
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets style property.', () => {
+			it('Sets style property.', () => {
 				cssStyleDeclaration[property] = 'test';
 				expect(attributes.style.value).toBe(`${CAMEL_TO_KEBAB_CASE(property)}: test;`);
 			});
@@ -32,14 +32,14 @@ describe('CSSStyleDeclaration', () => {
 	}
 
 	describe('item()', () => {
-		test('Returns an item by index.', () => {
+		it('Returns an item by index.', () => {
 			cssStyleDeclaration.setProperty('background-color', 'green');
 			expect(cssStyleDeclaration.item(0)).toBe('background-color');
 		});
 	});
 
 	describe('setProperty()', () => {
-		test('Sets a style property.', () => {
+		it('Sets a style property.', () => {
 			cssStyleDeclaration.setProperty('background-color', 'green');
 			expect(attributes.style.value).toBe('background-color: green;');
 			expect(cssStyleDeclaration.backgroundColor).toBe('green');
@@ -49,7 +49,7 @@ describe('CSSStyleDeclaration', () => {
 	});
 
 	describe('removeProperty()', () => {
-		test('Removes a style property.', () => {
+		it('Removes a style property.', () => {
 			cssStyleDeclaration.setProperty('background-color', 'green');
 			cssStyleDeclaration.removeProperty('background-color');
 			expect(attributes.style).toBe(undefined);
@@ -59,7 +59,7 @@ describe('CSSStyleDeclaration', () => {
 	});
 
 	describe('getPropertyValue()', () => {
-		test('Returns a style property.', () => {
+		it('Returns a style property.', () => {
 			cssStyleDeclaration.setProperty('background-color', 'green');
 			expect(cssStyleDeclaration.getPropertyValue('background-color')).toBe('green');
 		});
diff --git a/packages/happy-dom/test/custom-element/CustomElementRegistry.test.ts b/packages/happy-dom/test/custom-element/CustomElementRegistry.test.ts
index 2a1eeaca..839f3296 100644
--- a/packages/happy-dom/test/custom-element/CustomElementRegistry.test.ts
+++ b/packages/happy-dom/test/custom-element/CustomElementRegistry.test.ts
@@ -10,12 +10,12 @@ describe('CustomElementRegistry', () => {
 	});
 
 	describe('define()', () => {
-		test('Defines an HTML element and returns it with get().', () => {
+		it('Defines an HTML element and returns it with get().', () => {
 			customElements.define('custom-element', CustomElement);
 			expect(customElements.get('custom-element')).toBe(CustomElement);
 		});
 
-		test('Defines an HTML element and sets the "extends" option to "ul".', () => {
+		it('Defines an HTML element and sets the "extends" option to "ul".', () => {
 			customElements.define('custom-element', CustomElement, {
 				extends: 'ul'
 			});
@@ -23,7 +23,7 @@ describe('CustomElementRegistry', () => {
 			expect(customElements._registry['custom-element'].extends).toBe('ul');
 		});
 
-		test('Throws an error if tag name does not contain "-".', () => {
+		it('Throws an error if tag name does not contain "-".', () => {
 			const tagName = 'element';
 			expect(() => customElements.define(tagName, CustomElement)).toThrow(
 				new Error(
@@ -34,7 +34,7 @@ describe('CustomElementRegistry', () => {
 			);
 		});
 
-		test('Calls observed attributes and set _observedAttributes as a property on the element class.', () => {
+		it('Calls observed attributes and set _observedAttributes as a property on the element class.', () => {
 			customElements.define('custom-element', CustomElement);
 			expect(CustomElement.observedAttributesCallCount).toBe(1);
 			expect(CustomElement._observedAttributes).toEqual(['key1', 'key2']);
@@ -42,12 +42,12 @@ describe('CustomElementRegistry', () => {
 	});
 
 	describe('whenDefined()', () => {
-		test('Returns a promise which is fulfilled when an element is defined.', done => {
+		it('Returns a promise which is fulfilled when an element is defined.', done => {
 			customElements.whenDefined('custom-element').then(done);
 			customElements.define('custom-element', CustomElement);
 		});
 
-		test('Resolves directly if the element is already defined.', done => {
+		it('Resolves directly if the element is already defined.', done => {
 			customElements.define('custom-element', CustomElement);
 			customElements.whenDefined('custom-element').then(done);
 		});
diff --git a/packages/happy-dom/test/dom-implementation/DOMImplementation.test.ts b/packages/happy-dom/test/dom-implementation/DOMImplementation.test.ts
index 383dec82..cc2fcecf 100644
--- a/packages/happy-dom/test/dom-implementation/DOMImplementation.test.ts
+++ b/packages/happy-dom/test/dom-implementation/DOMImplementation.test.ts
@@ -12,7 +12,7 @@ describe('DOMImplementation', () => {
 	});
 
 	describe('createHTMLDocument()', () => {
-		test('Returns a new Document.', () => {
+		it('Returns a new Document.', () => {
 			const document = domImplementation.createHTMLDocument();
 			expect(document instanceof Document).toBe(true);
 			expect(document.defaultView).toBe(null);
@@ -20,7 +20,7 @@ describe('DOMImplementation', () => {
 	});
 
 	describe('createDocumentType()', () => {
-		test('Returns a new Document Type.', () => {
+		it('Returns a new Document Type.', () => {
 			const documentType = domImplementation.createDocumentType(
 				'qualifiedName',
 				'publicId',
diff --git a/packages/happy-dom/test/dom-parser/DOMParser.test.ts b/packages/happy-dom/test/dom-parser/DOMParser.test.ts
index 7ea539ca..e662a789 100644
--- a/packages/happy-dom/test/dom-parser/DOMParser.test.ts
+++ b/packages/happy-dom/test/dom-parser/DOMParser.test.ts
@@ -3,7 +3,8 @@ import XMLSerializer from '../../src/xml-serializer/XMLSerializer';
 import DOMParserHTML from './data/DOMParserHTML';
 
 describe('DOMParser', () => {
-	let domParser, window;
+	let domParser;
+	let window;
 
 	beforeEach(() => {
 		window = new Window();
@@ -11,21 +12,21 @@ describe('DOMParser', () => {
 	});
 
 	describe('parseFromString()', () => {
-		test('Parses HTML of a page and returns a new document.', () => {
+		it('Parses HTML of a page and returns a new document.', () => {
 			const newDocument = domParser.parseFromString(DOMParserHTML, 'text/html');
 			expect(new XMLSerializer().serializeToString(newDocument).replace(/[\s]/gm, '')).toBe(
 				DOMParserHTML.replace(/[\s]/gm, '')
 			);
 		});
 
-		test('Parses HTML with just a string and returns a new document with <html>, <head> and <body> tags.', () => {
+		it('Parses HTML with just a string and returns a new document with <html>, <head> and <body> tags.', () => {
 			const newDocument = domParser.parseFromString('Test', 'text/html');
 			expect(new XMLSerializer().serializeToString(newDocument)).toBe(
 				'<html><head></head><body>Test</body></html>'
 			);
 		});
 
-		test('Adds elements outside of the <html> tag to the <body> tag.', () => {
+		it('Adds elements outside of the <html> tag to the <body> tag.', () => {
 			const newDocument = domParser.parseFromString(
 				`
 				<html>
diff --git a/packages/happy-dom/test/event/EventTarget.test.ts b/packages/happy-dom/test/event/EventTarget.test.ts
index 861a681c..210b0395 100644
--- a/packages/happy-dom/test/event/EventTarget.test.ts
+++ b/packages/happy-dom/test/event/EventTarget.test.ts
@@ -3,6 +3,9 @@ import Event from '../../src/event/Event';
 import CustomEvent from '../../src/event/events/CustomEvent';
 
 const EVENT_TYPE = 'click';
+/**
+ *
+ */
 class TestEventTarget extends EventTarget {}
 
 describe('EventTarget', () => {
@@ -13,7 +16,7 @@ describe('EventTarget', () => {
 	});
 
 	describe('addEventListener()', () => {
-		test('Adds an event listener and triggers it when calling dispatchEvent().', () => {
+		it('Adds an event listener and triggers it when calling dispatchEvent().', () => {
 			let recievedEvent: Event = null;
 			const listener = (event: Event): void => {
 				recievedEvent = event;
@@ -26,7 +29,7 @@ describe('EventTarget', () => {
 			expect(recievedEvent.currentTarget).toBe(eventTarget);
 		});
 
-		test('Adds a custom event listener and triggers it when calling dispatchEvent().', () => {
+		it('Adds a custom event listener and triggers it when calling dispatchEvent().', () => {
 			let recievedEvent: CustomEvent = null;
 			const DETAIL = {};
 			const listener = (event: CustomEvent): void => {
@@ -41,7 +44,7 @@ describe('EventTarget', () => {
 			expect(recievedEvent.currentTarget).toBe(eventTarget);
 		});
 
-		test('Adds an event listener using object with handleEvent as property and triggers it when calling dispatchEvent().', () => {
+		it('Adds an event listener using object with handleEvent as property and triggers it when calling dispatchEvent().', () => {
 			let recievedEvent: CustomEvent = null;
 			const listener = {
 				handleEvent: (event: CustomEvent): void => {
@@ -58,7 +61,7 @@ describe('EventTarget', () => {
 	});
 
 	describe('removeEventListener()', () => {
-		test('Removes an event listener and does not call it when calling dispatchEvent().', () => {
+		it('Removes an event listener and does not call it when calling dispatchEvent().', () => {
 			let recievedEvent: Event = null;
 			const listener = (event: Event): void => {
 				recievedEvent = event;
diff --git a/packages/happy-dom/test/fetch/ResourceFetcher.test.ts b/packages/happy-dom/test/fetch/ResourceFetcher.test.ts
index 97272ddc..42b481af 100644
--- a/packages/happy-dom/test/fetch/ResourceFetcher.test.ts
+++ b/packages/happy-dom/test/fetch/ResourceFetcher.test.ts
@@ -3,7 +3,10 @@ import ResourceFetcher from '../../src/fetch/ResourceFetcher';
 import IResponse from '../../src/window/IResponse';
 
 describe('ResourceFetcher', () => {
-	let window: Window, syncRequestStatusCode, syncRequestBody, syncRequestOptions;
+	let window: Window;
+	let syncRequestStatusCode;
+	let syncRequestBody;
+	let syncRequestOptions;
 
 	beforeAll(() => {
 		jest.mock('sync-request', () => (method: string, url: string) => {
@@ -31,7 +34,7 @@ describe('ResourceFetcher', () => {
 	});
 
 	describe('fetch()', () => {
-		test('Returns resource data asynchrounously.', async () => {
+		it('Returns resource data asynchrounously.', async () => {
 			let fetchedURL = null;
 
 			jest.spyOn(window, 'fetch').mockImplementation(url => {
@@ -53,7 +56,7 @@ describe('ResourceFetcher', () => {
 	});
 
 	describe('fetchSync()', () => {
-		test('Returns resource data synchrounously.', () => {
+		it('Returns resource data synchrounously.', () => {
 			window.location.href = 'https://localhost:8080/base/';
 
 			const test = ResourceFetcher.fetchSync({
@@ -68,7 +71,7 @@ describe('ResourceFetcher', () => {
 			expect(test).toBe('test');
 		});
 
-		test('Handles error when resource is fetched synchrounously.', () => {
+		it('Handles error when resource is fetched synchrounously.', () => {
 			window.location.href = 'https://localhost:8080/base/';
 
 			syncRequestStatusCode = 404;
diff --git a/packages/happy-dom/test/file/Blob.test.ts b/packages/happy-dom/test/file/Blob.test.ts
index a793f0bd..50f300ce 100644
--- a/packages/happy-dom/test/file/Blob.test.ts
+++ b/packages/happy-dom/test/file/Blob.test.ts
@@ -2,28 +2,28 @@ import Blob from '../../src/file/Blob';
 
 describe('Blob', () => {
 	describe('get size()', () => {
-		test('Returns the correct size when bits is an Array of strings.', () => {
+		it('Returns the correct size when bits is an Array of strings.', () => {
 			const blob = new Blob(['TEST']);
 			expect(blob.size).toBe(4);
 		});
 	});
 
 	describe('get type()', () => {
-		test('Returns the type sent into the constructor.', () => {
+		it('Returns the type sent into the constructor.', () => {
 			const blob = new Blob(['TEST'], { type: 'TYPE' });
 			expect(blob.type).toBe('type');
 		});
 	});
 
 	describe('slice()', () => {
-		test('Returns a slice of the data when bits is an Array of strings.', () => {
+		it('Returns a slice of the data when bits is an Array of strings.', () => {
 			const blob = new Blob(['TEST']);
 			expect(blob.slice(1, 2)._buffer.toString()).toBe('E');
 		});
 	});
 
 	describe('toString()', () => {
-		test('Returns "[object Blob]".', () => {
+		it('Returns "[object Blob]".', () => {
 			const blob = new Blob(['TEST']);
 			expect(blob.toString()).toBe('[object Blob]');
 		});
diff --git a/packages/happy-dom/test/file/File.test.ts b/packages/happy-dom/test/file/File.test.ts
index 00fb5758..a202b90c 100644
--- a/packages/happy-dom/test/file/File.test.ts
+++ b/packages/happy-dom/test/file/File.test.ts
@@ -8,20 +8,20 @@ describe('File', () => {
 	});
 
 	describe('get name()', () => {
-		test('Returns the name of the File.', () => {
+		it('Returns the name of the File.', () => {
 			const file = new File(['TEST'], 'filename.jpg');
 			expect(file.name).toBe('filename.jpg');
 		});
 	});
 
 	describe('get lastModified()', () => {
-		test('Returns the current time if not provided to the constructor.', () => {
+		it('Returns the current time if not provided to the constructor.', () => {
 			jest.spyOn(Date, 'now').mockImplementation(() => NOW);
 			const file = new File(['TEST'], 'filename.jpg');
 			expect(file.lastModified).toBe(NOW);
 		});
 
-		test('Returns the current time if not provided to the constructor.', () => {
+		it('Returns the current time if not provided to the constructor.', () => {
 			const file = new File(['TEST'], 'filename.jpg', { lastModified: NOW });
 			expect(file.lastModified).toBe(NOW);
 		});
diff --git a/packages/happy-dom/test/file/FileReader.test.ts b/packages/happy-dom/test/file/FileReader.test.ts
index 744ff282..951a4229 100644
--- a/packages/happy-dom/test/file/FileReader.test.ts
+++ b/packages/happy-dom/test/file/FileReader.test.ts
@@ -13,7 +13,7 @@ describe('FileReader', () => {
 	});
 
 	describe('readAsDataURL()', () => {
-		test('Reads Blob as data URL.', async () => {
+		it('Reads Blob as data URL.', async () => {
 			const blob = new Blob(['TEST'], {
 				type: 'text/plain;charset=utf-8'
 			});
diff --git a/packages/happy-dom/test/history/History.test.ts b/packages/happy-dom/test/history/History.test.ts
index cfdabd44..c4d698b0 100644
--- a/packages/happy-dom/test/history/History.test.ts
+++ b/packages/happy-dom/test/history/History.test.ts
@@ -9,31 +9,31 @@ describe('History', () => {
 	});
 
 	describe('get length()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			expect(history.length).toBe(0);
 		});
 	});
 
 	describe('get state()', () => {
-		test('Returns "null".', () => {
+		it('Returns "null".', () => {
 			expect(history.state).toBe(null);
 		});
 	});
 
 	describe('get scrollRestoration()', () => {
-		test('Returns "auto" by default.', () => {
+		it('Returns "auto" by default.', () => {
 			expect(history.scrollRestoration).toBe(HistoryScrollRestorationEnum.auto);
 		});
 	});
 
 	describe('set scrollRestoration()', () => {
-		test('Is not possible to set an invalid value.', () => {
+		it('Is not possible to set an invalid value.', () => {
 			// @ts-ignore
 			history.scrollRestoration = 'invalid';
 			expect(history.scrollRestoration).toBe(HistoryScrollRestorationEnum.auto);
 		});
 
-		test('Is possible to set to "manual".', () => {
+		it('Is possible to set to "manual".', () => {
 			history.scrollRestoration = HistoryScrollRestorationEnum.manual;
 			expect(history.scrollRestoration).toBe(HistoryScrollRestorationEnum.manual);
 		});
@@ -41,7 +41,7 @@ describe('History', () => {
 
 	for (const method of ['back', 'forward', 'go', 'pushState', 'replaceState']) {
 		describe(`${method}()`, () => {
-			test('Method exists and does nothing.', () => {
+			it('Method exists and does nothing.', () => {
 				expect(typeof history[method]).toBe('function');
 				history[method]();
 			});
diff --git a/packages/happy-dom/test/location/Location.test.ts b/packages/happy-dom/test/location/Location.test.ts
index f26c0153..59c701ea 100644
--- a/packages/happy-dom/test/location/Location.test.ts
+++ b/packages/happy-dom/test/location/Location.test.ts
@@ -10,21 +10,21 @@ describe('Location', () => {
 	});
 
 	describe('replace()', () => {
-		test('Replaces the url.', () => {
+		it('Replaces the url.', () => {
 			location.replace(HREF);
 			expect(location.href).toBe(HREF);
 		});
 	});
 
 	describe('assign()', () => {
-		test('Replaces the url.', () => {
+		it('Replaces the url.', () => {
 			location.replace(HREF);
 			expect(location.href).toBe(HREF);
 		});
 	});
 
 	describe('reload()', () => {
-		test('Does nothing.', () => {
+		it('Does nothing.', () => {
 			location.replace(HREF);
 			location.reload();
 			expect(location.href).toBe(HREF);
diff --git a/packages/happy-dom/test/location/RelativeURL.test.ts b/packages/happy-dom/test/location/RelativeURL.test.ts
index 881c68ff..e4701377 100644
--- a/packages/happy-dom/test/location/RelativeURL.test.ts
+++ b/packages/happy-dom/test/location/RelativeURL.test.ts
@@ -9,21 +9,21 @@ describe('RelativeURL', () => {
 	});
 
 	describe('getAbsoluteURL()', () => {
-		test('Returns absolute URL when location is "https://localhost:8080/base/" and URL is "path/to/resource/".', () => {
+		it('Returns absolute URL when location is "https://localhost:8080/base/" and URL is "path/to/resource/".', () => {
 			location.href = 'https://localhost:8080/base/';
 			expect(RelativeURL.getAbsoluteURL(location, 'path/to/resource/')).toBe(
 				'https://localhost:8080/base/path/to/resource/'
 			);
 		});
 
-		test('Returns absolute URL when location is "https://localhost:8080" and URL is "path/to/resource/".', () => {
+		it('Returns absolute URL when location is "https://localhost:8080" and URL is "path/to/resource/".', () => {
 			location.href = 'https://localhost:8080';
 			expect(RelativeURL.getAbsoluteURL(location, 'path/to/resource/')).toBe(
 				'https://localhost:8080/path/to/resource/'
 			);
 		});
 
-		test('Returns absolute URL when URL is "https://localhost:8080/path/to/resource/".', () => {
+		it('Returns absolute URL when URL is "https://localhost:8080/path/to/resource/".', () => {
 			expect(RelativeURL.getAbsoluteURL(location, 'https://localhost:8080/path/to/resource/')).toBe(
 				'https://localhost:8080/path/to/resource/'
 			);
diff --git a/packages/happy-dom/test/location/URL.test.ts b/packages/happy-dom/test/location/URL.test.ts
index 0ec29f7e..806ab863 100644
--- a/packages/happy-dom/test/location/URL.test.ts
+++ b/packages/happy-dom/test/location/URL.test.ts
@@ -2,7 +2,7 @@ import URL from '../../src/location/URL';
 
 describe('URL', () => {
 	describe('constructor()', () => {
-		test('Parses "https://google.com/some-path/?key=value&key2=value2#hash".', () => {
+		it('Parses "https://google.com/some-path/?key=value&key2=value2#hash".', () => {
 			const href = 'https://google.com/some-path/?key=value&key2=value2#hash';
 			const url = new URL(href);
 			expect(url.href).toBe(href);
@@ -18,7 +18,7 @@ describe('URL', () => {
 			expect(url.origin).toBe('https://google.com');
 		});
 
-		test('Parses "https://user:password@google.com/some-path/".', () => {
+		it('Parses "https://user:password@google.com/some-path/".', () => {
 			const href = 'https://user:password@google.com/some-path/';
 			const url = new URL(href);
 			expect(url.href).toBe(href);
@@ -34,7 +34,7 @@ describe('URL', () => {
 			expect(url.origin).toBe('https://google.com');
 		});
 
-		test('Parses "https://google.com:8080/some-path/".', () => {
+		it('Parses "https://google.com:8080/some-path/".', () => {
 			const href = 'https://google.com:8080/some-path/';
 			const url = new URL(href);
 			expect(url.href).toBe(href);
diff --git a/packages/happy-dom/test/mutation-observer/MutationObserver.test.ts b/packages/happy-dom/test/mutation-observer/MutationObserver.test.ts
index d0606d8e..85d517f3 100644
--- a/packages/happy-dom/test/mutation-observer/MutationObserver.test.ts
+++ b/packages/happy-dom/test/mutation-observer/MutationObserver.test.ts
@@ -2,7 +2,8 @@ import Window from '../../src/window/Window';
 import MutationObserver from '../../src/mutation-observer/MutationObserver';
 
 describe('MutationObserver', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -10,7 +11,7 @@ describe('MutationObserver', () => {
 	});
 
 	describe('observe()', () => {
-		test('Observes attributes.', () => {
+		it('Observes attributes.', () => {
 			let records = [];
 			const div = document.createElement('div');
 			const observer = new MutationObserver(mutationRecords => {
@@ -33,7 +34,7 @@ describe('MutationObserver', () => {
 			]);
 		});
 
-		test('Observes attributes and old attribute values.', () => {
+		it('Observes attributes and old attribute values.', () => {
 			let records = [];
 			const div = document.createElement('div');
 			const observer = new MutationObserver(mutationRecords => {
@@ -57,7 +58,7 @@ describe('MutationObserver', () => {
 			]);
 		});
 
-		test('Only observes a list of filtered attributes if defined.', () => {
+		it('Only observes a list of filtered attributes if defined.', () => {
 			const records = [];
 			const div = document.createElement('div');
 			const observer = new MutationObserver(mutationRecords => {
@@ -65,7 +66,11 @@ describe('MutationObserver', () => {
 			});
 			div.setAttribute('attr1', 'old');
 			div.setAttribute('attr2', 'old');
-			observer.observe(div, { attributeFilter: ['attr1'], attributeOldValue: true, attributes: true });
+			observer.observe(div, {
+				attributeFilter: ['attr1'],
+				attributeOldValue: true,
+				attributes: true
+			});
 			div.setAttribute('attr1', 'new');
 			div.setAttribute('attr2', 'new');
 			expect(records).toEqual([
@@ -85,7 +90,7 @@ describe('MutationObserver', () => {
 			]);
 		});
 
-		test('Observers character data changes on text node.', () => {
+		it('Observers character data changes on text node.', () => {
 			const records = [];
 			const text = document.createTextNode('old');
 			const observer = new MutationObserver(mutationRecords => {
@@ -110,7 +115,7 @@ describe('MutationObserver', () => {
 			]);
 		});
 
-		test('Observers character data changes to child text nodes.', () => {
+		it('Observers character data changes to child text nodes.', () => {
 			const records = [];
 			const div = document.createElement('div');
 			const text = document.createTextNode('old');
diff --git a/packages/happy-dom/test/nodes/character-data/CharacterDataUtility.test.ts b/packages/happy-dom/test/nodes/character-data/CharacterDataUtility.test.ts
index 9e2cc45c..6e50fb9a 100644
--- a/packages/happy-dom/test/nodes/character-data/CharacterDataUtility.test.ts
+++ b/packages/happy-dom/test/nodes/character-data/CharacterDataUtility.test.ts
@@ -2,7 +2,8 @@ import Window from '../../../src/window/Window';
 import CharacterDataUtility from '../../../src/nodes/character-data/CharacterDataUtility';
 
 describe('CharacterDataTest', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -10,7 +11,7 @@ describe('CharacterDataTest', () => {
 	});
 
 	describe('appendData()', () => {
-		test('Appends data.', () => {
+		it('Appends data.', () => {
 			const node = document.createComment('test');
 			CharacterDataUtility.appendData(node, 'appended');
 			expect(node.data).toBe('testappended');
@@ -18,7 +19,7 @@ describe('CharacterDataTest', () => {
 	});
 
 	describe('deleteData()', () => {
-		test('Deletes data.', () => {
+		it('Deletes data.', () => {
 			const node = document.createComment('longstring');
 			CharacterDataUtility.deleteData(node, 1, 3);
 			expect(node.data).toBe('lstring');
@@ -26,7 +27,7 @@ describe('CharacterDataTest', () => {
 	});
 
 	describe('insertData()', () => {
-		test('Inserts data.', () => {
+		it('Inserts data.', () => {
 			const node = document.createComment('longstring');
 			CharacterDataUtility.insertData(node, 1, 'test');
 			expect(node.data).toBe('ltestongstring');
@@ -34,7 +35,7 @@ describe('CharacterDataTest', () => {
 	});
 
 	describe('replaceData()', () => {
-		test('Replaces data.', () => {
+		it('Replaces data.', () => {
 			const node = document.createComment('longstring');
 			CharacterDataUtility.replaceData(node, 1, 3, 'test');
 			expect(node.data).toBe('lteststring');
@@ -42,7 +43,7 @@ describe('CharacterDataTest', () => {
 	});
 
 	describe('substringData()', () => {
-		test('Returns a sub-string.', () => {
+		it('Returns a sub-string.', () => {
 			const node = document.createComment('longstring');
 			expect(CharacterDataUtility.substringData(node, 1, 3)).toBe('ong');
 		});
diff --git a/packages/happy-dom/test/nodes/child-node/ChildNodeUtility.test.ts b/packages/happy-dom/test/nodes/child-node/ChildNodeUtility.test.ts
index 8f980a7a..634cb25c 100644
--- a/packages/happy-dom/test/nodes/child-node/ChildNodeUtility.test.ts
+++ b/packages/happy-dom/test/nodes/child-node/ChildNodeUtility.test.ts
@@ -2,7 +2,8 @@ import Window from '../../../src/window/Window';
 import ChildNodeUtility from '../../../src/nodes/child-node/ChildNodeUtility';
 
 describe('ChildNodeUtility', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -10,7 +11,7 @@ describe('ChildNodeUtility', () => {
 	});
 
 	describe('remove()', () => {
-		test('Removes a node.', () => {
+		it('Removes a node.', () => {
 			const parent = document.createElement('div');
 			const node = document.createComment('test');
 			parent.appendChild(node);
@@ -21,7 +22,7 @@ describe('ChildNodeUtility', () => {
 	});
 
 	describe('replaceWith()', () => {
-		test('Replaces a node with another node.', () => {
+		it('Replaces a node with another node.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -37,7 +38,7 @@ describe('ChildNodeUtility', () => {
 			);
 		});
 
-		test('Replaces a node with a mixed list of Node and DOMString (string).', () => {
+		it('Replaces a node with a mixed list of Node and DOMString (string).', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -61,7 +62,7 @@ describe('ChildNodeUtility', () => {
 	});
 
 	describe('before()', () => {
-		test('Inserts a node before the child node.', () => {
+		it('Inserts a node before the child node.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -77,7 +78,7 @@ describe('ChildNodeUtility', () => {
 			);
 		});
 
-		test('Inserts a mixed list of Node and DOMString (string) before the child node.', () => {
+		it('Inserts a mixed list of Node and DOMString (string) before the child node.', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -101,7 +102,7 @@ describe('ChildNodeUtility', () => {
 	});
 
 	describe('after()', () => {
-		test('Inserts a node after the child node by appending the new node.', () => {
+		it('Inserts a node after the child node by appending the new node.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -117,7 +118,7 @@ describe('ChildNodeUtility', () => {
 			);
 		});
 
-		test('Inserts a node after the child node by inserting the new node.', () => {
+		it('Inserts a node after the child node by inserting the new node.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -133,7 +134,7 @@ describe('ChildNodeUtility', () => {
 			);
 		});
 
-		test('Inserts a mixed list of Node and DOMString (string) after the child node by appending the new nodes.', () => {
+		it('Inserts a mixed list of Node and DOMString (string) after the child node by appending the new nodes.', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
diff --git a/packages/happy-dom/test/nodes/child-node/NonDocumentChildNodeUtility.test.ts b/packages/happy-dom/test/nodes/child-node/NonDocumentChildNodeUtility.test.ts
index 516b2ad0..390a9ccd 100644
--- a/packages/happy-dom/test/nodes/child-node/NonDocumentChildNodeUtility.test.ts
+++ b/packages/happy-dom/test/nodes/child-node/NonDocumentChildNodeUtility.test.ts
@@ -2,7 +2,8 @@ import Window from '../../../src/window/Window';
 import NonDocumentChildNodeUtility from '../../../src/nodes/child-node/NonDocumentChildNodeUtility';
 
 describe('NonDocumentChildNodeUtility', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -10,7 +11,7 @@ describe('NonDocumentChildNodeUtility', () => {
 	});
 
 	describe('previousElementSibling()', () => {
-		test('Returns the previous element sibling.', () => {
+		it('Returns the previous element sibling.', () => {
 			const parent = document.createElement('div');
 			const comment = document.createComment('test');
 			const element1 = document.createElement('div');
@@ -25,7 +26,7 @@ describe('NonDocumentChildNodeUtility', () => {
 	});
 
 	describe('nextElementSibling()', () => {
-		test('Returns the next element sibling.', () => {
+		it('Returns the next element sibling.', () => {
 			const parent = document.createElement('div');
 			const comment = document.createComment('test');
 			const element1 = document.createElement('div');
diff --git a/packages/happy-dom/test/nodes/comment-node/CommentNode.test.ts b/packages/happy-dom/test/nodes/comment-node/CommentNode.test.ts
index 7e7b21c1..21346ac2 100644
--- a/packages/happy-dom/test/nodes/comment-node/CommentNode.test.ts
+++ b/packages/happy-dom/test/nodes/comment-node/CommentNode.test.ts
@@ -4,7 +4,8 @@ import Window from '../../../src/window/Window';
 import ChildNodeUtility from '../../../src/nodes/child-node/ChildNodeUtility';
 
 describe('CommentNode', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -16,28 +17,28 @@ describe('CommentNode', () => {
 	});
 
 	describe('get nodeName()', () => {
-		test('Returns "#comment".', () => {
+		it('Returns "#comment".', () => {
 			const node = document.createComment('test');
 			expect(node.nodeName).toBe('#comment');
 		});
 	});
 
 	describe('get length()', () => {
-		test('Returns "#comment".', () => {
+		it('Returns "#comment".', () => {
 			const node = document.createComment('test');
 			expect(node.length).toBe(4);
 		});
 	});
 
 	describe('get textContent()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createComment('test');
 			expect(node.textContent).toBe('test');
 		});
 	});
 
 	describe('set textContent()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createComment('test');
 			node.textContent = 'new text';
 			expect(node.textContent).toBe('new text');
@@ -45,14 +46,14 @@ describe('CommentNode', () => {
 	});
 
 	describe('get nodeValue()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createComment('test');
 			expect(node.nodeValue).toBe('test');
 		});
 	});
 
 	describe('set nodeValue()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createComment('test');
 			node.nodeValue = 'new text';
 			expect(node.nodeValue).toBe('new text');
@@ -60,14 +61,14 @@ describe('CommentNode', () => {
 	});
 
 	describe('get data()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createComment('test');
 			expect(node.data).toBe('test');
 		});
 	});
 
 	describe('set data()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createComment('test');
 			node.data = 'new text';
 			expect(node.data).toBe('new text');
@@ -75,7 +76,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('get previousElementSibling()', () => {
-		test('Returns previous element sibling..', () => {
+		it('Returns previous element sibling..', () => {
 			const node = document.createComment('test');
 			const previousElementSibling = document.createElement('div');
 			jest
@@ -90,7 +91,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('get nextElementSibling()', () => {
-		test('Returns next element sibling..', () => {
+		it('Returns next element sibling..', () => {
 			const node = document.createComment('test');
 			const nextElementSibling = document.createElement('div');
 			jest
@@ -105,14 +106,14 @@ describe('CommentNode', () => {
 	});
 
 	describe('toString()', () => {
-		test('Returns "[object Comment]".', () => {
+		it('Returns "[object Comment]".', () => {
 			const node = document.createComment('test');
 			expect(node.toString()).toBe('[object Comment]');
 		});
 	});
 
 	describe('remove()', () => {
-		test('Removes the node from its parent.', () => {
+		it('Removes the node from its parent.', () => {
 			const comment = document.createComment('test');
 			let isCalled = false;
 
@@ -127,7 +128,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('replaceWith()', () => {
-		test('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
+		it('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
 			const comment = document.createComment('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -145,7 +146,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('before()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const comment = document.createComment('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -163,7 +164,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('after()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const comment = document.createComment('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -181,7 +182,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('appendData()', () => {
-		test('Appends data.', () => {
+		it('Appends data.', () => {
 			const node = document.createComment('test');
 			const expectedData = 'data';
 			let isCalled = false;
@@ -198,7 +199,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('deleteData()', () => {
-		test('Deletes data.', () => {
+		it('Deletes data.', () => {
 			const node = document.createComment('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -219,7 +220,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('insertData()', () => {
-		test('Inserts data.', () => {
+		it('Inserts data.', () => {
 			const node = document.createComment('test');
 			const expectedOffset = -1;
 			const expectedData = 'data';
@@ -240,7 +241,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('replaceData()', () => {
-		test('Replaces data.', () => {
+		it('Replaces data.', () => {
 			const node = document.createComment('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -263,7 +264,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('substringData()', () => {
-		test('Returns a sub-string.', () => {
+		it('Returns a sub-string.', () => {
 			const node = document.createComment('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -282,7 +283,7 @@ describe('CommentNode', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones the node.', () => {
+		it('Clones the node.', () => {
 			const node = document.createComment('test');
 			const clone = node.cloneNode();
 			expect(clone.data).toBe(node.data);
diff --git a/packages/happy-dom/test/nodes/document-fragment/DocumentFragment.test.ts b/packages/happy-dom/test/nodes/document-fragment/DocumentFragment.test.ts
index 2fd7b8c9..c7c893c7 100644
--- a/packages/happy-dom/test/nodes/document-fragment/DocumentFragment.test.ts
+++ b/packages/happy-dom/test/nodes/document-fragment/DocumentFragment.test.ts
@@ -8,7 +8,9 @@ import INodeList from '../../../src/nodes/node/INodeList';
 import IElement from '../../../src/nodes/element/IElement';
 
 describe('DocumentFragment', () => {
-	let window, document, documentFragment;
+	let window;
+	let document;
+	let documentFragment;
 
 	beforeEach(() => {
 		window = new Window();
@@ -21,7 +23,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('get children()', () => {
-		test('Returns Element child nodes.', () => {
+		it('Returns Element child nodes.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			documentFragment.appendChild(document.createTextNode('test'));
@@ -33,7 +35,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('get childElementCount()', () => {
-		test('Returns child element count.', () => {
+		it('Returns child element count.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			documentFragment.appendChild(document.createTextNode('test'));
@@ -45,7 +47,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('get firstElementChild()', () => {
-		test('Returns first element child.', () => {
+		it('Returns first element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			documentFragment.appendChild(document.createTextNode('test'));
@@ -57,7 +59,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('get lastElementChild()', () => {
-		test('Returns last element child.', () => {
+		it('Returns last element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			documentFragment.appendChild(document.createTextNode('test'));
@@ -69,7 +71,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('get textContent()', () => {
-		test('Returns text node data of children as a concatenated string.', () => {
+		it('Returns text node data of children as a concatenated string.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -81,7 +83,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('set textContent()', () => {
-		test('Replaces child nodes with a text node.', () => {
+		it('Replaces child nodes with a text node.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -99,7 +101,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('append()', () => {
-		test('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -116,7 +118,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('prepend()', () => {
-		test('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -133,7 +135,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('replaceChildren()', () => {
-		test('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
+		it('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -152,7 +154,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('querySelectorAll()', () => {
-		test('Query CSS selector to find matching elements.', () => {
+		it('Query CSS selector to find matching elements.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -167,7 +169,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('querySelector()', () => {
-		test('Query CSS selector to find a matching element.', () => {
+		it('Query CSS selector to find a matching element.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -182,7 +184,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('appendChild()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -195,7 +197,7 @@ describe('DocumentFragment', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Append the children instead of the actual element if the type is DocumentFragment.', () => {
+		it('Append the children instead of the actual element if the type is DocumentFragment.', () => {
 			const template = <HTMLTemplateElement>document.createElement('template');
 
 			template.innerHTML = '<div>Div</div><span>Span</span>';
@@ -213,7 +215,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('removeChild()', () => {
-		test('Updates the children property when removing an element child.', () => {
+		it('Updates the children property when removing an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -229,7 +231,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('insertBefore()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -244,7 +246,7 @@ describe('DocumentFragment', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
+		it('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const template = <HTMLTemplateElement>document.createElement('template');
@@ -266,7 +268,7 @@ describe('DocumentFragment', () => {
 	});
 
 	describe('cloneNode', () => {
-		test('Makes a shallow clone of a node (default behavior).', () => {
+		it('Makes a shallow clone of a node (default behavior).', () => {
 			const text = document.createTextNode('test');
 			const div = document.createElement('div');
 			const comment = document.createComment('test');
@@ -281,7 +283,7 @@ describe('DocumentFragment', () => {
 			expect(documentFragment !== clone).toBe(true);
 		});
 
-		test('Makes a deep clone of the document fragment.', () => {
+		it('Makes a deep clone of the document fragment.', () => {
 			const text = document.createTextNode('test');
 			const div = document.createElement('div');
 			const comment = document.createComment('test');
diff --git a/packages/happy-dom/test/nodes/document/Document.test.ts b/packages/happy-dom/test/nodes/document/Document.test.ts
index b797bd1b..9e390b0d 100644
--- a/packages/happy-dom/test/nodes/document/Document.test.ts
+++ b/packages/happy-dom/test/nodes/document/Document.test.ts
@@ -39,20 +39,20 @@ describe('Document', () => {
 	});
 
 	describe('get nodeName()', () => {
-		test('Returns "#document".', () => {
+		it('Returns "#document".', () => {
 			expect(document.nodeName).toBe('#document');
 		});
 	});
 
 	describe('get children()', () => {
-		test('Returns Element child nodes.', () => {
+		it('Returns Element child nodes.', () => {
 			document.appendChild(document.createTextNode('test'));
 			expect(document.children).toEqual([document.documentElement]);
 		});
 	});
 
 	describe('get childElementCount()', () => {
-		test('Returns child element count.', () => {
+		it('Returns child element count.', () => {
 			document.appendChild(document.createElement('div'));
 			document.appendChild(document.createTextNode('test'));
 			expect(document.childElementCount).toEqual(2);
@@ -60,7 +60,7 @@ describe('Document', () => {
 	});
 
 	describe('get firstElementChild()', () => {
-		test('Returns first element child.', () => {
+		it('Returns first element child.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -81,7 +81,7 @@ describe('Document', () => {
 	});
 
 	describe('get lastElementChild()', () => {
-		test('Returns last element child.', () => {
+		it('Returns last element child.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -102,20 +102,20 @@ describe('Document', () => {
 	});
 
 	describe('get cookie()', () => {
-		test('Returns cookie string.', () => {
+		it('Returns cookie string.', () => {
 			document.cookie = 'name=value1';
 			expect(document.cookie).toBe('name=value1');
 		});
 	});
 
 	describe('set cookie()', () => {
-		test('Sets multiple cookies.', () => {
+		it('Sets multiple cookies.', () => {
 			document.cookie = 'name1=value1';
 			document.cookie = 'name2=value2';
 			expect(document.cookie).toBe('name1=value1; name2=value2');
 		});
 
-		test('Replaces cookie with the same name, but treats cookies with no value set differently from cookies with a value.', () => {
+		it('Replaces cookie with the same name, but treats cookies with no value set differently from cookies with a value.', () => {
 			document.cookie = 'name=value1';
 			document.cookie = 'name';
 			document.cookie = 'name=value2';
@@ -123,25 +123,25 @@ describe('Document', () => {
 			expect(document.cookie).toBe('name=value2; name');
 		});
 
-		test('Sets a cookie with a domain.', () => {
+		it('Sets a cookie with a domain.', () => {
 			window.location.href = 'https://test.com';
 			document.cookie = 'name=value1; domain=test.com';
 			expect(document.cookie).toBe('name=value1');
 		});
 
-		test('Sets a cookie with an invalid domain.', () => {
+		it('Sets a cookie with an invalid domain.', () => {
 			window.location.href = 'https://test.com';
 			document.cookie = 'name=value1; domain=invalid.com';
 			expect(document.cookie).toBe('');
 		});
 
-		test('Sets a cookie on a top-domain from a sub-domain.', () => {
+		it('Sets a cookie on a top-domain from a sub-domain.', () => {
 			window.location.href = 'https://sub.test.com';
 			document.cookie = 'name=value1; domain=test.com';
 			expect(document.cookie).toBe('name=value1');
 		});
 
-		test('Sets a cookie with a path.', () => {
+		it('Sets a cookie with a path.', () => {
 			window.location.href = '/path/to/cookie/';
 			document.cookie = 'name1=value1; path=path/to';
 			document.cookie = 'name2=value2; path=/path/to';
@@ -149,13 +149,13 @@ describe('Document', () => {
 			expect(document.cookie).toBe('name1=value1; name2=value2; name3=value3');
 		});
 
-		test('Does not set cookie if the path does not match the current path.', () => {
+		it('Does not set cookie if the path does not match the current path.', () => {
 			window.location.href = '/path/to/cookie/';
 			document.cookie = 'name1=value1; path=/cookie/';
 			expect(document.cookie).toBe('');
 		});
 
-		test('Sets a cookie if it expires is in the future.', () => {
+		it('Sets a cookie if it expires is in the future.', () => {
 			const date = new Date();
 			const oneHour = 3600000;
 			date.setTime(date.getTime() + oneHour);
@@ -164,12 +164,12 @@ describe('Document', () => {
 			expect(document.cookie).toBe('name=value1');
 		});
 
-		test('Does not set cookie if "expires" is in the past.', () => {
+		it('Does not set cookie if "expires" is in the past.', () => {
 			document.cookie = 'name=value1; expires=Thu, 01 Jan 1970 00:00:01 GMT';
 			expect(document.cookie).toBe('');
 		});
 
-		test('Removes a previously defined cookie if "expires" is in the past, but treats cookies with no value set differently from cookies with a value.', () => {
+		it('Removes a previously defined cookie if "expires" is in the past, but treats cookies with no value set differently from cookies with a value.', () => {
 			document.cookie = 'name=value1';
 			document.cookie = 'name';
 			document.cookie = 'name=value1; expires=Thu, 01 Jan 1970 00:00:01 GMT';
@@ -180,31 +180,31 @@ describe('Document', () => {
 	});
 
 	describe('get body()', () => {
-		test('Returns <body> element.', () => {
+		it('Returns <body> element.', () => {
 			expect(document.body).toBe(document.children[0].children[1]);
 		});
 	});
 
 	describe('get head()', () => {
-		test('Returns <head> element.', () => {
+		it('Returns <head> element.', () => {
 			expect(document.head).toBe(document.children[0].children[0]);
 		});
 	});
 
 	describe('get documentElement()', () => {
-		test('Returns <html> element.', () => {
+		it('Returns <html> element.', () => {
 			expect(document.documentElement).toBe(document.children[0]);
 		});
 	});
 
 	describe('get doctype()', () => {
-		test('Returns DocumentType element.', () => {
+		it('Returns DocumentType element.', () => {
 			expect(document.doctype).toBe(document.childNodes[0]);
 		});
 	});
 
 	describe('get styleSheets()', () => {
-		test('Returns all stylesheets loaded to the document.', done => {
+		it('Returns all stylesheets loaded to the document.', done => {
 			const textNode = document.createTextNode(
 				'body { background-color: red }\ndiv { background-color: green }'
 			);
@@ -249,7 +249,7 @@ describe('Document', () => {
 	});
 
 	describe('append()', () => {
-		test('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -266,7 +266,7 @@ describe('Document', () => {
 	});
 
 	describe('prepend()', () => {
-		test('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -283,7 +283,7 @@ describe('Document', () => {
 	});
 
 	describe('replaceChildren()', () => {
-		test('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
+		it('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -302,7 +302,7 @@ describe('Document', () => {
 	});
 
 	describe('querySelectorAll()', () => {
-		test('Query CSS selector to find matching elements.', () => {
+		it('Query CSS selector to find matching elements.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -317,7 +317,7 @@ describe('Document', () => {
 	});
 
 	describe('querySelector()', () => {
-		test('Query CSS selector to find a matching element.', () => {
+		it('Query CSS selector to find a matching element.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -332,7 +332,7 @@ describe('Document', () => {
 	});
 
 	describe('getElementsByClassName()', () => {
-		test('Returns an elements by class name.', () => {
+		it('Returns an elements by class name.', () => {
 			const element = document.createElement('div');
 			const className = 'className';
 
@@ -349,7 +349,7 @@ describe('Document', () => {
 	});
 
 	describe('getElementsByTagName()', () => {
-		test('Returns an elements by tag name.', () => {
+		it('Returns an elements by tag name.', () => {
 			const element = document.createElement('div');
 			const tagName = 'tag-name';
 
@@ -366,7 +366,7 @@ describe('Document', () => {
 	});
 
 	describe('getElementsByTagNameNS()', () => {
-		test('Returns an elements by tag name and namespace.', () => {
+		it('Returns an elements by tag name and namespace.', () => {
 			const element = document.createElement('div');
 			const tagName = 'tag-name';
 			const namespaceURI = '/namespace/uri/';
@@ -385,7 +385,7 @@ describe('Document', () => {
 	});
 
 	describe('getElementById()', () => {
-		test('Returns an element by ID.', () => {
+		it('Returns an element by ID.', () => {
 			const element = document.createElement('div');
 			const id = 'id';
 
@@ -402,7 +402,7 @@ describe('Document', () => {
 	});
 
 	describe('appendChild()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -419,7 +419,7 @@ describe('Document', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Append the children instead of the actual element if the type is DocumentFragment.', () => {
+		it('Append the children instead of the actual element if the type is DocumentFragment.', () => {
 			const template = <HTMLTemplateElement>document.createElement('template');
 
 			template.innerHTML = '<div>Div</div><span>Span</span>';
@@ -441,7 +441,7 @@ describe('Document', () => {
 	});
 
 	describe('removeChild()', () => {
-		test('Updates the children property when removing an element child.', () => {
+		it('Updates the children property when removing an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -461,7 +461,7 @@ describe('Document', () => {
 	});
 
 	describe('insertBefore()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -480,7 +480,7 @@ describe('Document', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
+		it('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const template = <HTMLTemplateElement>document.createElement('template');
@@ -506,7 +506,7 @@ describe('Document', () => {
 	});
 
 	describe('write()', () => {
-		test('Replaces the content of documentElement with new content the first time it is called and writes the body part to the body the second time.', () => {
+		it('Replaces the content of documentElement with new content the first time it is called and writes the body part to the body the second time.', () => {
 			const html = `
 				<html>
 					<head>
@@ -534,7 +534,7 @@ describe('Document', () => {
 			);
 		});
 
-		test('Adds elements outside of the <html> tag to the <body> tag.', () => {
+		it('Adds elements outside of the <html> tag to the <body> tag.', () => {
 			const html = `
 				<html>
 					<head>
@@ -564,7 +564,7 @@ describe('Document', () => {
 	});
 
 	describe('open()', () => {
-		test('Clears the document and opens it for writing.', () => {
+		it('Clears the document and opens it for writing.', () => {
 			const html = `
 				<html>
 					<head>
@@ -585,28 +585,28 @@ describe('Document', () => {
 	});
 
 	describe('close()', () => {
-		test('Has a close method.', () => {
+		it('Has a close method.', () => {
 			document.close();
 			expect(typeof document.close).toBe('function');
 		});
 	});
 
 	describe('createElement()', () => {
-		test('Creates an element.', () => {
+		it('Creates an element.', () => {
 			const div = document.createElement('div');
 			expect(div.tagName).toBe('DIV');
 			expect(div.namespaceURI).toBe(NamespaceURI.html);
 			expect(div instanceof HTMLElement).toBe(true);
 		});
 
-		test('Creates an svg element.', () => {
+		it('Creates an svg element.', () => {
 			const div = document.createElement('svg');
 			expect(div.tagName).toBe('SVG');
 			expect(div.namespaceURI).toBe(NamespaceURI.html);
 			expect(div instanceof SVGSVGElement).toBe(true);
 		});
 
-		test('Creates a custom element.', () => {
+		it('Creates a custom element.', () => {
 			window.customElements.define('custom-element', CustomElement);
 			const div = document.createElement('custom-element');
 			expect(div.tagName).toBe('CUSTOM-ELEMENT');
@@ -614,7 +614,7 @@ describe('Document', () => {
 			expect(div instanceof CustomElement).toBe(true);
 		});
 
-		test('Creates a custom element that has been extended from an "li" element.', () => {
+		it('Creates a custom element that has been extended from an "li" element.', () => {
 			window.customElements.define('custom-element', CustomElement, { extends: 'li' });
 			const div = document.createElement('li', { is: 'custom-element' });
 			expect(div.tagName).toBe('LI');
@@ -624,14 +624,14 @@ describe('Document', () => {
 	});
 
 	describe('createElementNS()', () => {
-		test('Creates an svg element with namespace set to SVG.', () => {
+		it('Creates an svg element with namespace set to SVG.', () => {
 			const svg = document.createElementNS(NamespaceURI.svg, 'svg');
 			expect(svg.tagName).toBe('SVG');
 			expect(svg.namespaceURI).toBe(NamespaceURI.svg);
 			expect(svg instanceof SVGSVGElement).toBe(true);
 		});
 
-		test('Creates a custom element with namespace set to SVG.', () => {
+		it('Creates a custom element with namespace set to SVG.', () => {
 			window.customElements.define('custom-element', CustomElement);
 			const div = document.createElementNS(NamespaceURI.svg, 'custom-element');
 			expect(div.tagName).toBe('CUSTOM-ELEMENT');
@@ -639,7 +639,7 @@ describe('Document', () => {
 			expect(div instanceof CustomElement).toBe(true);
 		});
 
-		test('Creates a custom element that has been extended from an "li" element with namespace set to SVG.', () => {
+		it('Creates a custom element that has been extended from an "li" element with namespace set to SVG.', () => {
 			window.customElements.define('custom-element', CustomElement, { extends: 'li' });
 			const div = document.createElementNS(NamespaceURI.svg, 'li', { is: 'custom-element' });
 			expect(div.tagName).toBe('LI');
@@ -649,69 +649,78 @@ describe('Document', () => {
 	});
 
 	describe('createAttribute()', () => {
-		test('Creates an Attr node.', () => {
+		it('Creates an Attr node.', () => {
 			const attribute = document.createAttribute('KEY1');
 			expect(attribute instanceof Attr).toBe(true);
 			expect(attribute).toEqual({
 				value: null,
 				name: 'key1',
-				namespaceURI: null
+				namespaceURI: null,
+				specified: true,
+				ownerElement: null,
+				ownerDocument: document
 			});
 		});
 	});
 
 	describe('createAttributeNS()', () => {
-		test('Creates an Attr node with namespace set to HTML.', () => {
+		it('Creates an Attr node with namespace set to HTML.', () => {
 			const attribute = document.createAttributeNS(NamespaceURI.html, 'KEY1');
 			expect(attribute instanceof Attr).toBe(true);
 			expect(attribute).toEqual({
 				value: null,
 				name: 'KEY1',
-				namespaceURI: NamespaceURI.html
+				namespaceURI: NamespaceURI.html,
+				specified: true,
+				ownerElement: null,
+				ownerDocument: document
 			});
 		});
 
-		test('Creates an Attr node with namespace set to SVG.', () => {
+		it('Creates an Attr node with namespace set to SVG.', () => {
 			const attribute = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 			expect(attribute instanceof Attr).toBe(true);
 			expect(attribute).toEqual({
 				value: null,
 				name: 'KEY1',
-				namespaceURI: NamespaceURI.svg
+				namespaceURI: NamespaceURI.svg,
+				specified: true,
+				ownerElement: null,
+				ownerDocument: document
 			});
 		});
 	});
 
 	describe('createTextNode()', () => {
-		test('Creates a text node.', () => {
+		it('Creates a text node.', () => {
 			const textContent = 'text';
 			const textNode = document.createTextNode(textContent);
 			expect(textNode.textContent).toBe(textContent);
 			expect(textNode instanceof Text).toBe(true);
 		});
 
-		test('Creates a text node without content.', () => {
+		it('Creates a text node without content.', () => {
 			const textNode = document.createTextNode();
 			expect(textNode.data).toBe('');
 		});
 	});
 
 	describe('createComment()', () => {
-		test('Creates a comment node.', () => {
+		it('Creates a comment node.', () => {
 			const textContent = 'text';
 			const commentNode = document.createComment(textContent);
 			expect(commentNode.textContent).toBe(textContent);
 			expect(commentNode instanceof Comment).toBe(true);
 		});
 
-		test('Creates a comment node without content.', () => {
+		it('Creates a comment node without content.', () => {
 			const commentNode = document.createComment();
 			expect(commentNode.data).toBe('');
 		});
 	});
 
 	describe('createDocumentFragment()', () => {
-		test('Creates a document fragment.', () => {
+		it('Creates a document fragment.', () => {
 			const documentFragment = document.createDocumentFragment();
 			expect(documentFragment.ownerDocument).toBe(document);
 			expect(documentFragment instanceof DocumentFragment).toBe(true);
@@ -719,7 +728,7 @@ describe('Document', () => {
 	});
 
 	describe('createTreeWalker()', () => {
-		test('Creates a document fragment.', () => {
+		it('Creates a document fragment.', () => {
 			const root = document.createElement('div');
 			const whatToShow = 1;
 			const filter = {
@@ -739,7 +748,7 @@ describe('Document', () => {
 	});
 
 	describe('createEvent()', () => {
-		test('Creates a legacy event.', () => {
+		it('Creates a legacy event.', () => {
 			const event = document.createEvent('Event');
 			event.initEvent('click', true, true);
 			expect(event.type).toBe('click');
@@ -750,7 +759,7 @@ describe('Document', () => {
 	});
 
 	describe('importNode()', () => {
-		test('Creates a clone of a Node and sets the ownerDocument to be the current document.', () => {
+		it('Creates a clone of a Node and sets the ownerDocument to be the current document.', () => {
 			const node = new Window().document.createElement('div');
 			const clone = <Element>document.importNode(node);
 			expect(clone.tagName).toBe('DIV');
@@ -760,7 +769,7 @@ describe('Document', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones the properties of the document when cloned.', () => {
+		it('Clones the properties of the document when cloned.', () => {
 			const child = document.createElement('div');
 			child.className = 'className';
 
@@ -780,7 +789,7 @@ describe('Document', () => {
 	});
 
 	describe('adoptNode()', () => {
-		test('Removes node from its original document and sets the ownerDocument to be the current document.', () => {
+		it('Removes node from its original document and sets the ownerDocument to be the current document.', () => {
 			const originalDocument = new Window().document;
 			const node = originalDocument.createElement('div');
 			originalDocument.body.append(node);
@@ -792,7 +801,7 @@ describe('Document', () => {
 			expect(originalDocument.querySelector('div')).toBe(null);
 		});
 
-		test('Just change the ownerDocument of the node to be the current document, if the original document does not have node inside tree.', () => {
+		it('Just change the ownerDocument of the node to be the current document, if the original document does not have node inside tree.', () => {
 			const node = new Window().document.createElement('div');
 			const adopted = <Element>document.adoptNode(node);
 
@@ -803,7 +812,7 @@ describe('Document', () => {
 	});
 
 	describe('addEventListener()', () => {
-		test('Triggers "readystatechange" event if no resources needs to be loaded.', done => {
+		it('Triggers "readystatechange" event if no resources needs to be loaded.', done => {
 			let readyChangeEvent = null;
 
 			document.addEventListener('readystatechange', event => {
@@ -819,7 +828,7 @@ describe('Document', () => {
 			}, 1);
 		});
 
-		test('Triggers "readystatechange" event when all resources have been loaded.', done => {
+		it('Triggers "readystatechange" event when all resources have been loaded.', done => {
 			const cssURL = '/path/to/file.css';
 			const jsURL = '/path/to/file.js';
 			const cssResponse = 'body { background-color: red; }';
diff --git a/packages/happy-dom/test/nodes/element/ClassList.test.ts b/packages/happy-dom/test/nodes/element/ClassList.test.ts
index 7e67facc..eccf8010 100644
--- a/packages/happy-dom/test/nodes/element/ClassList.test.ts
+++ b/packages/happy-dom/test/nodes/element/ClassList.test.ts
@@ -2,7 +2,10 @@ import Window from '../../../src/window/Window';
 import ClassList from '../../../src/nodes/element/ClassList';
 
 describe('ClassList', () => {
-	let window, document, element, classList;
+	let window;
+	let document;
+	let element;
+	let classList;
 
 	beforeEach(() => {
 		window = new Window();
@@ -12,14 +15,14 @@ describe('ClassList', () => {
 	});
 
 	describe('add()', () => {
-		test('Adds a class to the list.', () => {
+		it('Adds a class to the list.', () => {
 			classList.add('class');
 			expect(element.className).toBe('class');
 			classList.add('class2');
 			classList.add('class3');
 			expect(element.className).toBe('class class2 class3');
 		});
-		test('Adds multiple classes to the list.', () => {
+		it('Adds multiple classes to the list.', () => {
 			classList.add('class1');
 			classList.add('class2');
 			expect(element.className).toBe('class1 class2');
@@ -27,7 +30,7 @@ describe('ClassList', () => {
 	});
 
 	describe('remove()', () => {
-		test('Removes a class from the list.', () => {
+		it('Removes a class from the list.', () => {
 			classList.add('class');
 			classList.remove('class');
 			expect(element.className).toBe('');
@@ -35,7 +38,7 @@ describe('ClassList', () => {
 	});
 
 	describe('contains()', () => {
-		test('Returns "true" if the list contains a class.', () => {
+		it('Returns "true" if the list contains a class.', () => {
 			classList.add('class');
 			expect(classList.contains('class')).toBe(true);
 		});
diff --git a/packages/happy-dom/test/nodes/element/Element.test.ts b/packages/happy-dom/test/nodes/element/Element.test.ts
index 599602b9..0e12faed 100644
--- a/packages/happy-dom/test/nodes/element/Element.test.ts
+++ b/packages/happy-dom/test/nodes/element/Element.test.ts
@@ -38,7 +38,7 @@ describe('Element', () => {
 	});
 
 	describe('children', () => {
-		test('Returns nodes of type Element.', () => {
+		it('Returns nodes of type Element.', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const textNode = document.createTextNode('text');
@@ -50,53 +50,53 @@ describe('Element', () => {
 	});
 
 	describe('get id()', () => {
-		test('Returns the element "id" attribute.', () => {
+		it('Returns the element "id" attribute.', () => {
 			element.setAttribute('id', 'id');
 			expect(element.id).toBe('id');
 		});
 	});
 
 	describe('set id()', () => {
-		test('Sets the element "id" as an attribute.', () => {
+		it('Sets the element "id" as an attribute.', () => {
 			element.id = 'id';
 			expect(element.getAttribute('id')).toBe('id');
 		});
 	});
 
 	describe('get className()', () => {
-		test('Returns the element "class" attribute.', () => {
+		it('Returns the element "class" attribute.', () => {
 			element.setAttribute('class', 'class');
 			expect(element.className).toBe('class');
 		});
 	});
 
 	describe('set id()', () => {
-		test('Sets the element "class" as an attribute.', () => {
+		it('Sets the element "class" as an attribute.', () => {
 			element.className = 'class';
 			expect(element.getAttribute('class')).toBe('class');
 		});
 	});
 
 	describe('get namespaceURI()', () => {
-		test('Returns the "namespaceURI" property of the element.', () => {
+		it('Returns the "namespaceURI" property of the element.', () => {
 			expect(element.namespaceURI).toEqual(NamespaceURI.html);
 		});
 	});
 
 	describe('get nodeName()', () => {
-		test('Returns the "tagName" property of the element.', () => {
+		it('Returns the "tagName" property of the element.', () => {
 			expect(element.nodeName).toEqual('DIV');
 		});
 	});
 
 	describe('get localName()', () => {
-		test('Returns the "tagName" property of the element in lower case.', () => {
+		it('Returns the "tagName" property of the element in lower case.', () => {
 			expect(element.localName).toEqual('div');
 		});
 	});
 
 	describe('get textContent()', () => {
-		test('Returns text node data of children as a concatenated string.', () => {
+		it('Returns text node data of children as a concatenated string.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -108,7 +108,7 @@ describe('Element', () => {
 	});
 
 	describe('set textContent()', () => {
-		test('Replaces child nodes with a text node.', () => {
+		it('Replaces child nodes with a text node.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -126,7 +126,7 @@ describe('Element', () => {
 	});
 
 	describe('get innerHTML()', () => {
-		test('Returns HTML of children as a concatenated string.', () => {
+		it('Returns HTML of children as a concatenated string.', () => {
 			const div = document.createElement('div');
 
 			element.appendChild(div);
@@ -141,7 +141,7 @@ describe('Element', () => {
 	});
 
 	describe('set innerHTML()', () => {
-		test('Creates child nodes from provided HTML.', () => {
+		it('Creates child nodes from provided HTML.', () => {
 			const root = document.createElement('div');
 			const div = document.createElement('div');
 			const textNode = document.createTextNode('text1');
@@ -162,7 +162,7 @@ describe('Element', () => {
 	});
 
 	describe('get innerHTML()', () => {
-		test('Returns HTML of an elements children as a concatenated string.', () => {
+		it('Returns HTML of an elements children as a concatenated string.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 
@@ -174,7 +174,7 @@ describe('Element', () => {
 	});
 
 	describe('get outerHTML()', () => {
-		test('Returns HTML of an element and its children as a concatenated string.', () => {
+		it('Returns HTML of an element and its children as a concatenated string.', () => {
 			const div = document.createElement('div');
 			const textNode = document.createTextNode('text1');
 
@@ -187,7 +187,7 @@ describe('Element', () => {
 	});
 
 	describe('set outerHTML()', () => {
-		test('Sets outer HTML of an element.', () => {
+		it('Sets outer HTML of an element.', () => {
 			const div = document.createElement('div');
 			const textNode = document.createTextNode('text1');
 
@@ -202,25 +202,67 @@ describe('Element', () => {
 	});
 
 	describe('get attributes()', () => {
-		test('Returns all attributes as an object.', () => {
+		it('Returns all attributes as an object.', () => {
 			element.setAttribute('key1', 'value1');
 			element.setAttribute('key2', 'value2');
 			element.setAttribute('key3', 'value3');
 
 			expect(element.attributes).toEqual({
-				'0': { name: 'key1', value: 'value1', namespaceURI: null },
-				'1': { name: 'key2', value: 'value2', namespaceURI: null },
-				'2': { name: 'key3', value: 'value3', namespaceURI: null },
-				key1: { name: 'key1', value: 'value1', namespaceURI: null },
-				key2: { name: 'key2', value: 'value2', namespaceURI: null },
-				key3: { name: 'key3', value: 'value3', namespaceURI: null },
+				'0': {
+					name: 'key1',
+					value: 'value1',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'1': {
+					name: 'key2',
+					value: 'value2',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'2': {
+					name: 'key3',
+					value: 'value3',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				key1: {
+					name: 'key1',
+					value: 'value1',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				key2: {
+					name: 'key2',
+					value: 'value2',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				key3: {
+					name: 'key3',
+					value: 'value3',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
 				length: 3
 			});
 		});
 	});
 
 	describe('get childElementCount()', () => {
-		test('Returns child element count.', () => {
+		it('Returns child element count.', () => {
 			document.appendChild(document.createElement('div'));
 			document.appendChild(document.createTextNode('test'));
 			expect(document.childElementCount).toEqual(2);
@@ -228,7 +270,7 @@ describe('Element', () => {
 	});
 
 	describe('get firstElementChild()', () => {
-		test('Returns first element child.', () => {
+		it('Returns first element child.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -249,7 +291,7 @@ describe('Element', () => {
 	});
 
 	describe('get lastElementChild()', () => {
-		test('Returns last element child.', () => {
+		it('Returns last element child.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -270,7 +312,7 @@ describe('Element', () => {
 	});
 
 	describe('append()', () => {
-		test('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -287,7 +329,7 @@ describe('Element', () => {
 	});
 
 	describe('prepend()', () => {
-		test('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
+		it('Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -304,7 +346,7 @@ describe('Element', () => {
 	});
 
 	describe('insertAdjacentElement()', () => {
-		test('Inserts a Node right before the reference element and returns with it.', () => {
+		it('Inserts a Node right before the reference element and returns with it.', () => {
 			const parent = document.createElement('div');
 			const newNode = document.createElement('span');
 
@@ -318,7 +360,7 @@ describe('Element', () => {
 			expect(document.body.childNodes[0]).toBe(newNode);
 		});
 
-		test('Returns with null if cannot insert with "beforebegin".', () => {
+		it('Returns with null if cannot insert with "beforebegin".', () => {
 			const parent = document.createElement('div');
 			const newNode = document.createElement('span');
 			const insertedNode = parent.insertAdjacentElement('beforebegin', newNode);
@@ -327,7 +369,7 @@ describe('Element', () => {
 			expect(newNode.isConnected).toBe(false);
 		});
 
-		test('Inserts a Node inside the reference element before the first child and returns with it.', () => {
+		it('Inserts a Node inside the reference element before the first child and returns with it.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const newNode = document.createElement('span');
@@ -343,7 +385,7 @@ describe('Element', () => {
 			expect(insertedNode.isConnected).toBe(true);
 		});
 
-		test('Inserts a Node inside the reference element after the last child and returns with it.', () => {
+		it('Inserts a Node inside the reference element after the last child and returns with it.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const newNode = document.createElement('span');
@@ -358,7 +400,7 @@ describe('Element', () => {
 			expect(insertedNode.isConnected).toBe(true);
 		});
 
-		test('Inserts a Node right after the reference element and returns with it.', () => {
+		it('Inserts a Node right after the reference element and returns with it.', () => {
 			const parent = document.createElement('div');
 			const newNode = document.createElement('span');
 
@@ -374,7 +416,7 @@ describe('Element', () => {
 			expect(document.body.childNodes[1]).toBe(insertedNode);
 		});
 
-		test('Inserts a Node right after the reference element and returns with it.', () => {
+		it('Inserts a Node right after the reference element and returns with it.', () => {
 			const parent = document.createElement('div');
 			const sibling = document.createElement('div');
 			const newNode = document.createElement('span');
@@ -393,7 +435,7 @@ describe('Element', () => {
 			expect(document.body.childNodes[2]).toBe(sibling);
 		});
 
-		test('Returns with null if cannot insert with "afterend".', () => {
+		it('Returns with null if cannot insert with "afterend".', () => {
 			const parent = document.createElement('div');
 			const newNode = document.createElement('span');
 			const insertedNode = parent.insertAdjacentElement('afterend', newNode);
@@ -404,7 +446,7 @@ describe('Element', () => {
 	});
 
 	describe('insertAdjacentHTML()', () => {
-		test('Inserts the given HTML right before the reference element.', () => {
+		it('Inserts the given HTML right before the reference element.', () => {
 			const parent = document.createElement('div');
 			const markup = '<span>markup</span>';
 
@@ -415,7 +457,7 @@ describe('Element', () => {
 			expect((<IElement>document.body.childNodes[0]).outerHTML).toEqual(markup);
 		});
 
-		test('Inserts the given HTML inside the reference element before the first child.', () => {
+		it('Inserts the given HTML inside the reference element before the first child.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const markup = '<span>markup</span>';
@@ -428,7 +470,7 @@ describe('Element', () => {
 			expect(parent.childNodes[1]).toBe(child);
 		});
 
-		test('Inserts the given HTML inside the reference element after the last child.', () => {
+		it('Inserts the given HTML inside the reference element after the last child.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const markup = '<span>markup</span>';
@@ -441,7 +483,7 @@ describe('Element', () => {
 			expect((<IElement>parent.childNodes[1]).outerHTML).toEqual(markup);
 		});
 
-		test('Inserts the given HTML right after the reference element.', () => {
+		it('Inserts the given HTML right after the reference element.', () => {
 			const parent = document.createElement('div');
 			const markup = '<span>markup</span>';
 
@@ -453,7 +495,7 @@ describe('Element', () => {
 			expect((<IElement>document.body.childNodes[1]).outerHTML).toEqual(markup);
 		});
 
-		test('Inserts the given HTML right after the reference element if it has a sibling.', () => {
+		it('Inserts the given HTML right after the reference element if it has a sibling.', () => {
 			const parent = document.createElement('div');
 			const sibling = document.createElement('div');
 			const markup = '<span>markup</span>';
@@ -470,7 +512,7 @@ describe('Element', () => {
 	});
 
 	describe('insertAdjacentText()', () => {
-		test('Inserts the given text right before the reference element.', () => {
+		it('Inserts the given text right before the reference element.', () => {
 			const parent = document.createElement('div');
 			const text = 'lorem';
 
@@ -482,7 +524,7 @@ describe('Element', () => {
 			expect(document.body.childNodes[0].textContent).toEqual(text);
 		});
 
-		test('Inserts the given text inside the reference element before the first child.', () => {
+		it('Inserts the given text inside the reference element before the first child.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const text = 'lorem';
@@ -496,7 +538,7 @@ describe('Element', () => {
 			expect(parent.childNodes[1]).toBe(child);
 		});
 
-		test('Inserts the given text inside the reference element after the last child.', () => {
+		it('Inserts the given text inside the reference element after the last child.', () => {
 			const parent = document.createElement('div');
 			const child = document.createElement('span');
 			const text = 'lorem';
@@ -510,7 +552,7 @@ describe('Element', () => {
 			expect(parent.childNodes[1].textContent).toEqual(text);
 		});
 
-		test('Inserts the given text right after the reference element.', () => {
+		it('Inserts the given text right after the reference element.', () => {
 			const parent = document.createElement('div');
 			const text = 'lorem';
 
@@ -523,7 +565,7 @@ describe('Element', () => {
 			expect(document.body.childNodes[1].textContent).toEqual(text);
 		});
 
-		test('Inserts the given text right after the reference element.', () => {
+		it('Inserts the given text right after the reference element.', () => {
 			const parent = document.createElement('div');
 			const sibling = document.createElement('div');
 			const text = 'lorem';
@@ -541,7 +583,7 @@ describe('Element', () => {
 	});
 
 	describe('replaceChildren()', () => {
-		test('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
+		it('Replaces the existing children of a ParentNode with a specified new set of children.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -560,7 +602,7 @@ describe('Element', () => {
 	});
 
 	describe('matches()', () => {
-		test('Checks if the element matches a selector string.', () => {
+		it('Checks if the element matches a selector string.', () => {
 			const element = document.createElement('div');
 
 			element.className = 'container active';
@@ -570,7 +612,7 @@ describe('Element', () => {
 	});
 
 	describe('querySelectorAll()', () => {
-		test('Query CSS selector to find matching elements.', () => {
+		it('Query CSS selector to find matching elements.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -585,7 +627,7 @@ describe('Element', () => {
 	});
 
 	describe('querySelector()', () => {
-		test('Query CSS selector to find a matching element.', () => {
+		it('Query CSS selector to find a matching element.', () => {
 			const element = document.createElement('div');
 			const expectedSelector = 'selector';
 
@@ -600,7 +642,7 @@ describe('Element', () => {
 	});
 
 	describe('getElementsByClassName()', () => {
-		test('Returns an elements by class name.', () => {
+		it('Returns an elements by class name.', () => {
 			const child = document.createElement('div');
 			const className = 'className';
 
@@ -617,7 +659,7 @@ describe('Element', () => {
 	});
 
 	describe('getElementsByTagName()', () => {
-		test('Returns an elements by tag name.', () => {
+		it('Returns an elements by tag name.', () => {
 			const child = document.createElement('div');
 			const tagName = 'tag-name';
 
@@ -634,7 +676,7 @@ describe('Element', () => {
 	});
 
 	describe('getElementsByTagNameNS()', () => {
-		test('Returns an elements by tag name and namespace.', () => {
+		it('Returns an elements by tag name and namespace.', () => {
 			const child = document.createElement('div');
 			const tagName = 'tag-name';
 			const namespaceURI = '/namespace/uri/';
@@ -653,7 +695,7 @@ describe('Element', () => {
 	});
 
 	describe('remove()', () => {
-		test('Removes the node from its parent.', () => {
+		it('Removes the node from its parent.', () => {
 			const element = document.createElement('div');
 			let isCalled = false;
 
@@ -668,7 +710,7 @@ describe('Element', () => {
 	});
 
 	describe('replaceWith()', () => {
-		test('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
+		it('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -685,7 +727,7 @@ describe('Element', () => {
 	});
 
 	describe('before()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -702,7 +744,7 @@ describe('Element', () => {
 	});
 
 	describe('after()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
 			let isCalled = false;
@@ -719,7 +761,7 @@ describe('Element', () => {
 	});
 
 	describe('appendChild()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -732,7 +774,7 @@ describe('Element', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Append the children instead of the actual element if the type is DocumentFragment.', () => {
+		it('Append the children instead of the actual element if the type is DocumentFragment.', () => {
 			const template = <HTMLTemplateElement>document.createElement('template');
 
 			template.innerHTML = '<div>Div</div><span>Span</span>';
@@ -748,7 +790,7 @@ describe('Element', () => {
 	});
 
 	describe('removeChild()', () => {
-		test('Updates the children property when removing an element child.', () => {
+		it('Updates the children property when removing an element child.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -764,7 +806,7 @@ describe('Element', () => {
 	});
 
 	describe('insertBefore()', () => {
-		test('Updates the children property when appending an element child.', () => {
+		it('Updates the children property when appending an element child.', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -779,7 +821,7 @@ describe('Element', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
+		it('Insert the children instead of the actual element before another reference Node if the type is DocumentFragment.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const template = <HTMLTemplateElement>document.createElement('template');
@@ -801,7 +843,7 @@ describe('Element', () => {
 	});
 
 	describe('get previousElementSibling()', () => {
-		test('Returns previous element sibling..', () => {
+		it('Returns previous element sibling..', () => {
 			const node = document.createComment('test');
 			const previousElementSibling = document.createElement('div');
 			jest
@@ -816,7 +858,7 @@ describe('Element', () => {
 	});
 
 	describe('get nextElementSibling()', () => {
-		test('Returns next element sibling..', () => {
+		it('Returns next element sibling..', () => {
 			const node = document.createComment('test');
 			const nextElementSibling = document.createElement('div');
 			jest
@@ -831,7 +873,7 @@ describe('Element', () => {
 	});
 
 	describe('attributeChangedCallback()', () => {
-		test('Calls attribute changed callback when it is implemented by a custom element (web component).', () => {
+		it('Calls attribute changed callback when it is implemented by a custom element (web component).', () => {
 			const customElement = <CustomElement>document.createElement('custom-element');
 
 			element.appendChild(customElement);
@@ -860,7 +902,7 @@ describe('Element', () => {
 			]);
 		});
 
-		test('Does not call the attribute changed callback when the attribute name is not available in the observedAttributes() getter method.', () => {
+		it('Does not call the attribute changed callback when the attribute name is not available in the observedAttributes() getter method.', () => {
 			const customElement = <CustomElement>document.createElement('custom-element');
 
 			element.appendChild(customElement);
@@ -874,35 +916,91 @@ describe('Element', () => {
 	});
 
 	describe('setAttribute()', () => {
-		test('Sets an attribute on an element.', () => {
+		it('Sets an attribute on an element.', () => {
 			element.setAttribute('key1', 'value1');
 			element.setAttribute('key2', '');
 			expect(element.attributes).toEqual({
-				'0': { name: 'key1', value: 'value1', namespaceURI: null },
-				'1': { name: 'key2', value: '', namespaceURI: null },
-				key1: { name: 'key1', value: 'value1', namespaceURI: null },
-				key2: { name: 'key2', value: '', namespaceURI: null },
+				'0': {
+					name: 'key1',
+					value: 'value1',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'1': {
+					name: 'key2',
+					value: '',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				key1: {
+					name: 'key1',
+					value: 'value1',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				key2: {
+					name: 'key2',
+					value: '',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
 				length: 2
 			});
 		});
 	});
 
 	describe('setAttributeNS()', () => {
-		test('Sets a namespace attribute on an element.', () => {
+		it('Sets a namespace attribute on an element.', () => {
 			element.setAttributeNS(NAMESPACE_URI, 'global:local1', 'value1');
 			element.setAttributeNS(NAMESPACE_URI, 'global:local2', '');
 			expect(element.attributes).toEqual({
-				'0': { name: 'global:local1', value: 'value1', namespaceURI: NAMESPACE_URI },
-				'1': { name: 'global:local2', value: '', namespaceURI: NAMESPACE_URI },
-				'global:local1': { name: 'global:local1', value: 'value1', namespaceURI: NAMESPACE_URI },
-				'global:local2': { name: 'global:local2', value: '', namespaceURI: NAMESPACE_URI },
+				'0': {
+					name: 'global:local1',
+					value: 'value1',
+					namespaceURI: NAMESPACE_URI,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'1': {
+					name: 'global:local2',
+					value: '',
+					namespaceURI: NAMESPACE_URI,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'global:local1': {
+					name: 'global:local1',
+					value: 'value1',
+					namespaceURI: NAMESPACE_URI,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
+				'global:local2': {
+					name: 'global:local2',
+					value: '',
+					namespaceURI: NAMESPACE_URI,
+					specified: true,
+					ownerElement: element,
+					ownerDocument: document
+				},
 				length: 2
 			});
 		});
 	});
 
 	describe('hasAttribute()', () => {
-		test('Returns "true" if an element has an attribute.', () => {
+		it('Returns "true" if an element has an attribute.', () => {
 			element.setAttribute('key1', 'value1');
 			element.setAttribute('key2', '');
 			expect(element.hasAttribute('key1')).toBe(true);
@@ -915,7 +1013,7 @@ describe('Element', () => {
 	});
 
 	describe('hasAttributeNS()', () => {
-		test('Returns "true" if an element has a namespace attribute.', () => {
+		it('Returns "true" if an element has a namespace attribute.', () => {
 			element.setAttributeNS(NAMESPACE_URI, 'global:local1', 'value1');
 			element.setAttributeNS(NAMESPACE_URI, 'global:local2', '');
 			expect(element.hasAttributeNS(NAMESPACE_URI, 'local1')).toBe(true);
@@ -928,7 +1026,7 @@ describe('Element', () => {
 	});
 
 	describe('removeAttribute()', () => {
-		test('Removes an attribute.', () => {
+		it('Removes an attribute.', () => {
 			element.setAttribute('key1', 'value1');
 			element.removeAttribute('key1');
 			expect(element.attributes).toEqual({
@@ -938,7 +1036,7 @@ describe('Element', () => {
 	});
 
 	describe('removeAttributeNS()', () => {
-		test('Removes a namespace attribute.', () => {
+		it('Removes a namespace attribute.', () => {
 			element.setAttributeNS(NAMESPACE_URI, 'global:local', 'value');
 			element.removeAttributeNS(NAMESPACE_URI, 'local');
 			expect(element.attributes).toEqual({
@@ -948,7 +1046,7 @@ describe('Element', () => {
 	});
 
 	describe('attachShadow()', () => {
-		test('Creates a new ShadowRoot node and sets it to the shadowRoot property.', () => {
+		it('Creates a new ShadowRoot node and sets it to the shadowRoot property.', () => {
 			element.attachShadow({ mode: 'open' });
 			expect(element.shadowRoot instanceof ShadowRoot).toBe(true);
 			expect(element.shadowRoot.ownerDocument).toBe(document);
@@ -960,7 +1058,7 @@ describe('Element', () => {
 
 	for (const functionName of ['scroll', 'scrollTo']) {
 		describe(`${functionName}()`, () => {
-			test('Sets the properties scrollTop and scrollLeft.', () => {
+			it('Sets the properties scrollTop and scrollLeft.', () => {
 				element[functionName](50, 60);
 				expect(element.scrollLeft).toBe(50);
 				expect(element.scrollTop).toBe(60);
@@ -968,7 +1066,7 @@ describe('Element', () => {
 		});
 
 		describe(`${functionName}()`, () => {
-			test('Sets the properties scrollTop and scrollLeft using object.', () => {
+			it('Sets the properties scrollTop and scrollLeft using object.', () => {
 				element[functionName]({ left: 50, top: 60 });
 				expect(element.scrollLeft).toBe(50);
 				expect(element.scrollTop).toBe(60);
@@ -976,7 +1074,7 @@ describe('Element', () => {
 		});
 
 		describe(`${functionName}()`, () => {
-			test('Sets only the property scrollTop.', () => {
+			it('Sets only the property scrollTop.', () => {
 				element[functionName]({ top: 60 });
 				expect(element.scrollLeft).toBe(0);
 				expect(element.scrollTop).toBe(60);
@@ -984,7 +1082,7 @@ describe('Element', () => {
 		});
 
 		describe(`${functionName}()`, () => {
-			test('Sets only the property scrollLeft.', () => {
+			it('Sets only the property scrollLeft.', () => {
 				element[functionName]({ left: 60 });
 				expect(element.scrollLeft).toBe(60);
 				expect(element.scrollTop).toBe(0);
@@ -992,7 +1090,7 @@ describe('Element', () => {
 		});
 
 		describe(`${functionName}()`, () => {
-			test('Sets the properties scrollTop and scrollLeft with animation.', async () => {
+			it('Sets the properties scrollTop and scrollLeft with animation.', async () => {
 				element[functionName]({ left: 50, top: 60, behavior: 'smooth' });
 				expect(element.scrollLeft).toBe(0);
 				expect(element.scrollTop).toBe(0);
@@ -1004,27 +1102,27 @@ describe('Element', () => {
 	}
 
 	describe('toString()', () => {
-		test('Returns the same as outerHTML.', () => {
+		it('Returns the same as outerHTML.', () => {
 			expect(element.toString()).toBe(element.outerHTML);
 		});
 	});
 
 	describe('getBoundingClientRect()', () => {
-		test('Returns an instance of DOMRect.', () => {
+		it('Returns an instance of DOMRect.', () => {
 			const domRect = element.getBoundingClientRect();
 			expect(domRect instanceof DOMRect).toBe(true);
 		});
 	});
 
 	describe('createTextRange()', () => {
-		test('Returns an instance of Range.', () => {
+		it('Returns an instance of Range.', () => {
 			const range = element.createTextRange();
 			expect(range instanceof Range).toBe(true);
 		});
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones the properties of the element when cloned.', () => {
+		it('Clones the properties of the element when cloned.', () => {
 			const child = document.createElement('div');
 
 			child.className = 'className';
@@ -1052,7 +1150,7 @@ describe('Element', () => {
 
 	for (const method of ['setAttributeNode', 'setAttributeNodeNS']) {
 		describe(`${method}()`, () => {
-			test('Sets an Attr node on a <div> element.', () => {
+			it('Sets an Attr node on a <div> element.', () => {
 				const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 				const attribute2 = document.createAttribute('KEY2');
 
@@ -1066,28 +1164,40 @@ describe('Element', () => {
 					'0': {
 						name: 'key1',
 						namespaceURI: NamespaceURI.svg,
-						value: 'value1'
+						value: 'value1',
+						specified: true,
+						ownerElement: element,
+						ownerDocument: document
 					},
 					'1': {
 						name: 'key2',
 						namespaceURI: null,
-						value: 'value2'
+						value: 'value2',
+						specified: true,
+						ownerElement: element,
+						ownerDocument: document
 					},
 					key1: {
 						name: 'key1',
 						namespaceURI: NamespaceURI.svg,
-						value: 'value1'
+						value: 'value1',
+						specified: true,
+						ownerElement: element,
+						ownerDocument: document
 					},
 					key2: {
 						name: 'key2',
 						namespaceURI: null,
-						value: 'value2'
+						value: 'value2',
+						specified: true,
+						ownerElement: element,
+						ownerDocument: document
 					},
 					length: 2
 				});
 			});
 
-			test('Sets an Attr node on an <svg> element.', () => {
+			it('Sets an Attr node on an <svg> element.', () => {
 				const svg = document.createElementNS(NamespaceURI.svg, 'svg');
 				const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 				const attribute2 = document.createAttribute('KEY2');
@@ -1102,22 +1212,34 @@ describe('Element', () => {
 					'0': {
 						name: 'KEY1',
 						namespaceURI: NamespaceURI.svg,
-						value: 'value1'
+						value: 'value1',
+						specified: true,
+						ownerElement: svg,
+						ownerDocument: document
 					},
 					'1': {
 						name: 'key2',
 						namespaceURI: null,
-						value: 'value2'
+						value: 'value2',
+						specified: true,
+						ownerElement: svg,
+						ownerDocument: document
 					},
 					KEY1: {
 						name: 'KEY1',
 						namespaceURI: NamespaceURI.svg,
-						value: 'value1'
+						value: 'value1',
+						specified: true,
+						ownerElement: svg,
+						ownerDocument: document
 					},
 					key2: {
 						name: 'key2',
 						namespaceURI: null,
-						value: 'value2'
+						value: 'value2',
+						specified: true,
+						ownerElement: svg,
+						ownerDocument: document
 					},
 					length: 2
 				});
@@ -1126,7 +1248,7 @@ describe('Element', () => {
 	}
 
 	describe(`getAttributeNode()`, () => {
-		test('Returns an Attr node from a <div> element.', () => {
+		it('Returns an Attr node from a <div> element.', () => {
 			const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 			const attribute2 = document.createAttribute('KEY2');
 
@@ -1142,7 +1264,7 @@ describe('Element', () => {
 			expect(element.getAttributeNode('KEY2')).toBe(attribute2);
 		});
 
-		test('Returns an Attr node from an <svg> element.', () => {
+		it('Returns an Attr node from an <svg> element.', () => {
 			const svg = document.createElementNS(NamespaceURI.svg, 'svg');
 			const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 			const attribute2 = document.createAttribute('KEY2');
@@ -1161,7 +1283,7 @@ describe('Element', () => {
 	});
 
 	describe(`getAttributeNode()`, () => {
-		test('Returns a namespaced Attr node from a <div> element.', () => {
+		it('Returns a namespaced Attr node from a <div> element.', () => {
 			const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 
 			attribute1.value = 'value1';
@@ -1172,7 +1294,7 @@ describe('Element', () => {
 			expect(element.getAttributeNodeNS(NamespaceURI.svg, 'KEY1')).toBe(attribute1);
 		});
 
-		test('Returns an Attr node from an <svg> element.', () => {
+		it('Returns an Attr node from an <svg> element.', () => {
 			const svg = document.createElementNS(NamespaceURI.svg, 'svg');
 			const attribute1 = document.createAttributeNS(NamespaceURI.svg, 'KEY1');
 
@@ -1188,7 +1310,7 @@ describe('Element', () => {
 
 	for (const method of ['removeAttributeNode', 'removeAttributeNodeNS']) {
 		describe(`${method}()`, () => {
-			test('Removes an Attr node.', () => {
+			it('Removes an Attr node.', () => {
 				const attribute = document.createAttribute('KEY1');
 
 				attribute.value = 'value1';
@@ -1201,7 +1323,7 @@ describe('Element', () => {
 	}
 
 	describe('replaceWith()', () => {
-		test('Replaces a node with another node.', () => {
+		it('Replaces a node with another node.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -1214,7 +1336,7 @@ describe('Element', () => {
 			);
 		});
 
-		test('Replaces a node with a mixed list of Node and DOMString (string).', () => {
+		it('Replaces a node with a mixed list of Node and DOMString (string).', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -1232,7 +1354,7 @@ describe('Element', () => {
 	});
 
 	describe('scroll()', () => {
-		test('Sets the properties "scrollTop" and "scrollLeft".', () => {
+		it('Sets the properties "scrollTop" and "scrollLeft".', () => {
 			const div = document.createElement('div');
 			div.scroll(10, 15);
 			expect(div.scrollLeft).toBe(10);
diff --git a/packages/happy-dom/test/nodes/html-element/HTMLElement.test.ts b/packages/happy-dom/test/nodes/html-element/HTMLElement.test.ts
index 741fbfcc..e47bbedb 100644
--- a/packages/happy-dom/test/nodes/html-element/HTMLElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-element/HTMLElement.test.ts
@@ -18,8 +18,8 @@ describe('HTMLElement', () => {
 	});
 
 	for (const property of ['accessKey', 'accessKeyLabel']) {
-		describe(property, () => {
-			test('Returns "".', () => {
+		describe(`${property}`, () => {
+			it('Returns "".', () => {
 				const div = document.createElement('div');
 				expect(div[property]).toBe('');
 			});
@@ -34,8 +34,8 @@ describe('HTMLElement', () => {
 		'clientHeight',
 		'clientWidth'
 	]) {
-		describe(property, () => {
-			test('Returns "0".', () => {
+		describe(`${property}`, () => {
+			it('Returns "0".', () => {
 				const div = document.createElement('div');
 				expect(div[property]).toBe(0);
 			});
@@ -43,21 +43,21 @@ describe('HTMLElement', () => {
 	}
 
 	describe('contentEditable', () => {
-		test('Returns "inherit".', () => {
+		it('Returns "inherit".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			expect(div.contentEditable).toBe('inherit');
 		});
 	});
 
 	describe('isContentEditable', () => {
-		test('Returns "false".', () => {
+		it('Returns "false".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			expect(div.isContentEditable).toBe(false);
 		});
 	});
 
 	describe('get tabIndex()', () => {
-		test('Returns the attribute "tabindex" as a number.', () => {
+		it('Returns the attribute "tabindex" as a number.', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.setAttribute('tabindex', '5');
 			expect(div.tabIndex).toBe(5);
@@ -65,13 +65,13 @@ describe('HTMLElement', () => {
 	});
 
 	describe('set tabIndex()', () => {
-		test('Sets the attribute "tabindex".', () => {
+		it('Sets the attribute "tabindex".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.tabIndex = 5;
 			expect(div.getAttribute('tabindex')).toBe('5');
 		});
 
-		test('Removes the attribute "tabindex" when set to "-1".', () => {
+		it('Removes the attribute "tabindex" when set to "-1".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.tabIndex = 5;
 			div.tabIndex = -1;
@@ -80,7 +80,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('get innerText()', () => {
-		test('Returns the as the textContent property.', () => {
+		it('Returns the as the textContent property.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -93,7 +93,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('set innerText()', () => {
-		test('Sets the value of the textContent property.', () => {
+		it('Sets the value of the textContent property.', () => {
 			const div = document.createElement('div');
 			const textNode1 = document.createTextNode('text1');
 			const textNode2 = document.createTextNode('text2');
@@ -112,7 +112,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('get style()', () => {
-		test('Returns styles.', () => {
+		it('Returns styles.', () => {
 			element.setAttribute('style', 'border-radius: 2px; padding: 2px;');
 			expect(element.style.length).toEqual(2);
 			expect(element.style[0]).toEqual('border-radius');
@@ -130,7 +130,7 @@ describe('HTMLElement', () => {
 			expect(element.style.cssText).toEqual('border-radius: 4px; padding: 4px;');
 		});
 
-		test('Setting a property changes the "style" attribute.', () => {
+		it('Setting a property changes the "style" attribute.', () => {
 			element.setAttribute('style', 'border-radius: 2px; padding: 2px;');
 
 			element.style.borderRadius = '4rem';
@@ -154,7 +154,7 @@ describe('HTMLElement', () => {
 			);
 		});
 
-		test('Settings a property to empty string also removes it.', () => {
+		it('Settings a property to empty string also removes it.', () => {
 			element.setAttribute('style', 'border-radius: 2px; padding: 2px;');
 
 			element.style.borderRadius = '';
@@ -176,7 +176,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('get dataset()', () => {
-		test('Returns attributes prefixed with "data-" as an object.', () => {
+		it('Returns attributes prefixed with "data-" as an object.', () => {
 			element.setAttribute('test1', 'value1');
 			element.setAttribute('data-test2', 'value2');
 			element.setAttribute('test3', 'value3');
@@ -189,7 +189,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('get dir()', () => {
-		test('Returns the attribute "dir".', () => {
+		it('Returns the attribute "dir".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.setAttribute('dir', 'rtl');
 			expect(div.dir).toBe('rtl');
@@ -197,7 +197,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('set dir()', () => {
-		test('Sets the attribute "tabindex".', () => {
+		it('Sets the attribute "tabindex".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.dir = 'rtl';
 			expect(div.getAttribute('dir')).toBe('rtl');
@@ -205,7 +205,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('get hidden()', () => {
-		test('Returns the attribute "hidden".', () => {
+		it('Returns the attribute "hidden".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.setAttribute('hidden', '');
 			expect(div.hidden).toBe(true);
@@ -213,7 +213,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('set hidden()', () => {
-		test('Sets the attribute "hidden".', () => {
+		it('Sets the attribute "hidden".', () => {
 			const div = <HTMLElement>document.createElement('div');
 			div.hidden = true;
 			expect(div.getAttribute('hidden')).toBe('');
@@ -224,7 +224,7 @@ describe('HTMLElement', () => {
 
 	for (const property of ['lang', 'title']) {
 		describe(`get ${property}`, () => {
-			test(`Returns the attribute "${property}".`, () => {
+			it(`Returns the attribute "${property}".`, () => {
 				const div = document.createElement('div');
 				div.setAttribute(property, 'value');
 				expect(div[property]).toBe('value');
@@ -232,7 +232,7 @@ describe('HTMLElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the attribute "${property}".`, () => {
+			it(`Sets the attribute "${property}".`, () => {
 				const div = document.createElement('div');
 				div[property] = 'value';
 				expect(div.getAttribute(property)).toBe('value');
@@ -242,7 +242,7 @@ describe('HTMLElement', () => {
 
 	for (const eventType of ['click', 'blur', 'focus', 'focusin', 'focusout']) {
 		describe(`${eventType}()`, () => {
-			test(`Dispatches a "${eventType}" event.`, () => {
+			it(`Dispatches a "${eventType}" event.`, () => {
 				let methodName = eventType;
 				let triggeredEvent = null;
 
@@ -272,7 +272,7 @@ describe('HTMLElement', () => {
 	}
 
 	describe('setAttributeNode()', () => {
-		test('Sets css text of existing CSSStyleDeclaration.', () => {
+		it('Sets css text of existing CSSStyleDeclaration.', () => {
 			element.style.background = 'green';
 			element.style.color = 'black';
 			element.setAttribute('style', 'color: green');
@@ -283,7 +283,7 @@ describe('HTMLElement', () => {
 	});
 
 	describe('removeAttributeNode()', () => {
-		test('Removes property from CSSStyleDeclaration.', () => {
+		it('Removes property from CSSStyleDeclaration.', () => {
 			element.style.background = 'green';
 			element.style.color = 'black';
 			element.removeAttribute('style');
diff --git a/packages/happy-dom/test/nodes/html-form-element/HTMLFormElement.test.ts b/packages/happy-dom/test/nodes/html-form-element/HTMLFormElement.test.ts
index 1f63f550..1332ef90 100644
--- a/packages/happy-dom/test/nodes/html-form-element/HTMLFormElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-form-element/HTMLFormElement.test.ts
@@ -24,7 +24,7 @@ describe('HTMLFormElement', () => {
 		'noValidate'
 	]) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe('');
 				element.setAttribute(property, 'value');
 				expect(element[property]).toBe('value');
@@ -32,7 +32,7 @@ describe('HTMLFormElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 'value';
 				expect(element.getAttribute(property)).toBe('value');
 			});
@@ -40,7 +40,7 @@ describe('HTMLFormElement', () => {
 	}
 
 	describe('get method()', () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.method).toBe('get');
 			element.setAttribute('method', 'post');
 			expect(element.method).toBe('post');
@@ -48,7 +48,7 @@ describe('HTMLFormElement', () => {
 	});
 
 	describe('set method()', () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.method = 'post';
 			expect(element.getAttribute('method')).toBe('post');
 		});
diff --git a/packages/happy-dom/test/nodes/html-image-element/HTMLImageElement.test.ts b/packages/happy-dom/test/nodes/html-image-element/HTMLImageElement.test.ts
index 50ab4f64..503d689f 100644
--- a/packages/happy-dom/test/nodes/html-image-element/HTMLImageElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-image-element/HTMLImageElement.test.ts
@@ -22,7 +22,7 @@ describe('HTMLImageElement', () => {
 		'width'
 	]) {
 		describe(`get ${property}()`, () => {
-			test(`Returns the "${property}" attribute.`, () => {
+			it(`Returns the "${property}" attribute.`, () => {
 				const element = document.createElement('img');
 				element.setAttribute(property, 'test');
 				expect(element[property]).toBe('test');
@@ -30,7 +30,7 @@ describe('HTMLImageElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the attribute "${property}".`, () => {
+			it(`Sets the attribute "${property}".`, () => {
 				const element = document.createElement('img');
 				element[property] = 'test';
 				expect(element.getAttribute(property)).toBe('test');
@@ -40,7 +40,7 @@ describe('HTMLImageElement', () => {
 
 	for (const property of ['isMap']) {
 		describe(`get ${property}()`, () => {
-			test(`Returns "true" if the "${property}" attribute is defined.`, () => {
+			it(`Returns "true" if the "${property}" attribute is defined.`, () => {
 				const element = document.createElement('img');
 				element.setAttribute(property, '');
 				expect(element[property]).toBe(true);
@@ -48,7 +48,7 @@ describe('HTMLImageElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the "${property}" attribute to an empty string if set to "true".`, () => {
+			it(`Sets the "${property}" attribute to an empty string if set to "true".`, () => {
 				const element = document.createElement('img');
 				element[property] = true;
 				expect(element.getAttribute(property)).toBe('');
@@ -57,63 +57,63 @@ describe('HTMLImageElement', () => {
 	}
 
 	describe('get complete()', () => {
-		test('Returns "false".', () => {
+		it('Returns "false".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.complete).toBe(false);
 		});
 	});
 
 	describe('get naturalHeight()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.naturalHeight).toBe(0);
 		});
 	});
 
 	describe('get naturalWidth()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.naturalWidth).toBe(0);
 		});
 	});
 
 	describe('get crossOrigin()', () => {
-		test('Returns "null".', () => {
+		it('Returns "null".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.crossOrigin).toBe(null);
 		});
 	});
 
 	describe('get decoding()', () => {
-		test('Returns "auto".', () => {
+		it('Returns "auto".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.decoding).toBe('auto');
 		});
 	});
 
 	describe('get loading()', () => {
-		test('Returns "auto".', () => {
+		it('Returns "auto".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.loading).toBe('auto');
 		});
 	});
 
 	describe('get x()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.x).toBe(0);
 		});
 	});
 
 	describe('get y()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			expect(element.y).toBe(0);
 		});
 	});
 
 	describe('decode()', () => {
-		test('Executes a promise.', async () => {
+		it('Executes a promise.', async () => {
 			const element = <HTMLImageElement>document.createElement('img');
 			await element.decode();
 		});
diff --git a/packages/happy-dom/test/nodes/html-input-element/HTMLInputElement.test.ts b/packages/happy-dom/test/nodes/html-input-element/HTMLInputElement.test.ts
index d0cb9f93..1823eb02 100644
--- a/packages/happy-dom/test/nodes/html-input-element/HTMLInputElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-input-element/HTMLInputElement.test.ts
@@ -18,7 +18,7 @@ describe('HTMLInputElement', () => {
 
 	describe('get value()', () => {
 		for (const type of ['hidden', 'submit', 'image', 'reset', 'button']) {
-			test(`Returns the attribute "value" if type is "${type}".`, () => {
+			it(`Returns the attribute "value" if type is "${type}".`, () => {
 				element.type = type;
 				element.setAttribute('value', 'VALUE');
 				expect(element.value).toBe('VALUE');
@@ -26,20 +26,20 @@ describe('HTMLInputElement', () => {
 		}
 
 		for (const type of ['checkbox', 'radio']) {
-			test(`Returns the attribute "value" if type is "${type}".`, () => {
+			it(`Returns the attribute "value" if type is "${type}".`, () => {
 				element.type = type;
 				element.setAttribute('value', 'VALUE');
 				expect(element.value).toBe('VALUE');
 			});
 
-			test(`Returns "on" if the attribute "value" has not been set and type is "${type}".`, () => {
+			it(`Returns "on" if the attribute "value" has not been set and type is "${type}".`, () => {
 				element.type = type;
 				expect(element.value).toBe('on');
 			});
 		}
 
 		for (const type of ['text', 'search', 'url', 'tel', 'password']) {
-			test(`Returns the attribute "value" if type is "${type}".`, () => {
+			it(`Returns the attribute "value" if type is "${type}".`, () => {
 				element.type = type;
 				element.setAttribute('value', 'VALUE');
 				expect(element.selectionStart).toBe(5);
@@ -48,7 +48,7 @@ describe('HTMLInputElement', () => {
 			});
 		}
 
-		test('Returns "/fake/path/[filename]" if type is "file".', () => {
+		it('Returns "/fake/path/[filename]" if type is "file".', () => {
 			const file = new File(['TEST'], 'filename.jpg');
 			element.type = 'file';
 			element.files.push(file);
@@ -58,14 +58,14 @@ describe('HTMLInputElement', () => {
 
 	describe('set value()', () => {
 		for (const type of ['hidden', 'submit', 'image', 'reset', 'button', 'checkbox', 'radio']) {
-			test(`Sets the attribute "value" to the value if type is "${type}".`, () => {
+			it(`Sets the attribute "value" to the value if type is "${type}".`, () => {
 				element.type = type;
 				element.value = 'VALUE';
 				expect(element.getAttribute('value')).toBe('VALUE');
 			});
 		}
 
-		test('Throws an exception if a value other than empty string is provided and type is "file".', () => {
+		it('Throws an exception if a value other than empty string is provided and type is "file".', () => {
 			element.type = 'file';
 			expect(() => {
 				element.value = 'TEST';
@@ -74,18 +74,18 @@ describe('HTMLInputElement', () => {
 			);
 		});
 
-		test('Accepts an empty string if type is "file".', () => {
+		it('Accepts an empty string if type is "file".', () => {
 			element.type = 'file';
 			element.value = '';
 		});
 
-		test('Trims the value if type is "email".', () => {
+		it('Trims the value if type is "email".', () => {
 			element.type = 'email';
 			element.value = '  \n\rtest@test.com  ';
 			expect(element.value).toBe('test@test.com');
 		});
 
-		test('Trims each email address in the value if type is "email" and "multiple" is set to "true".', () => {
+		it('Trims each email address in the value if type is "email" and "multiple" is set to "true".', () => {
 			element.type = 'email';
 			element.setAttribute('multiple', 'multiple');
 			element.value = '  \n\rtest@test.com , test2@test.com  ';
@@ -94,7 +94,7 @@ describe('HTMLInputElement', () => {
 		});
 
 		for (const type of ['password', 'search', 'tel', 'text']) {
-			test(`Removes new lines if type is "${type}".`, () => {
+			it(`Removes new lines if type is "${type}".`, () => {
 				element.type = type;
 				element.value = '\n\rVALUE\n\r';
 				expect(element.value).toBe('VALUE');
@@ -102,7 +102,7 @@ describe('HTMLInputElement', () => {
 				expect(element.selectionEnd).toBe(5);
 			});
 
-			test(`Sets selection range.`, () => {
+			it(`Sets selection range.`, () => {
 				element.type = type;
 				element.selectionDirection = HTMLInputElementSelectionDirectionEnum.forward;
 				element.value = 'VALUE';
@@ -112,13 +112,13 @@ describe('HTMLInputElement', () => {
 			});
 		}
 
-		test('Sets the value if the value is a valid hex code and type is "color".', () => {
+		it('Sets the value if the value is a valid hex code and type is "color".', () => {
 			element.type = 'color';
 			element.value = '#333333';
 			expect(element.value).toBe('#333333');
 		});
 
-		test('Sets the value to "#000000" if the value is not a valid hex code and type is "color".', () => {
+		it('Sets the value to "#000000" if the value is not a valid hex code and type is "color".', () => {
 			element.type = 'color';
 			element.value = 'test';
 			expect(element.value).toBe('#000000');
@@ -126,32 +126,32 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('#000000');
 		});
 
-		test('Sets the value if it is a valid number and type is "number".', () => {
+		it('Sets the value if it is a valid number and type is "number".', () => {
 			element.type = 'number';
 			element.value = '10';
 			expect(element.value).toBe('10');
 		});
 
-		test('Sets the value to empty string if the value is not a valid number and type is "number".', () => {
+		it('Sets the value to empty string if the value is not a valid number and type is "number".', () => {
 			element.type = 'number';
 			element.value = 'test';
 			expect(element.value).toBe('');
 		});
 
-		test('Sets the value to "50" if no min or max has been set, the value is an invalid number and the type is "range".', () => {
+		it('Sets the value to "50" if no min or max has been set, the value is an invalid number and the type is "range".', () => {
 			element.type = 'range';
 			element.value = 'test';
 			expect(element.value).toBe('50');
 		});
 
-		test('Sets the value to "25" if max has been set to "50", the value is an invalid number and the type is "range".', () => {
+		it('Sets the value to "25" if max has been set to "50", the value is an invalid number and the type is "range".', () => {
 			element.type = 'range';
 			element.max = '50';
 			element.value = 'test';
 			expect(element.value).toBe('25');
 		});
 
-		test('Sets the value to "40" if min is set to "20" and max is set to "60", the value is an invalid number and the type is "range".', () => {
+		it('Sets the value to "40" if min is set to "20" and max is set to "60", the value is an invalid number and the type is "range".', () => {
 			element.type = 'range';
 			element.min = '20';
 			element.max = '60';
@@ -159,7 +159,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('40');
 		});
 
-		test('Sets the value to "40" if min is set to "40", the value is out of range and the type is "range".', () => {
+		it('Sets the value to "40" if min is set to "40", the value is out of range and the type is "range".', () => {
 			element.type = 'range';
 			element.min = '40';
 			element.max = '80';
@@ -167,7 +167,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('40');
 		});
 
-		test('Sets the value to "80" if max is set to "80", the value is out of range and the type is "range".', () => {
+		it('Sets the value to "80" if max is set to "80", the value is out of range and the type is "range".', () => {
 			element.type = 'range';
 			element.min = '40';
 			element.max = '80';
@@ -175,7 +175,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('80');
 		});
 
-		test('Sets the value if it is valid, within range and type is "range".', () => {
+		it('Sets the value if it is valid, within range and type is "range".', () => {
 			element.type = 'range';
 			element.min = '40';
 			element.max = '80';
@@ -183,7 +183,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('60');
 		});
 
-		test('Trims and removes new lines if type is "url".', () => {
+		it('Trims and removes new lines if type is "url".', () => {
 			element.type = 'url';
 			element.value = '  \n\rhttp://www.test.com\n\r ';
 			expect(element.value).toBe('http://www.test.com');
@@ -191,12 +191,12 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('get selectionStart()', () => {
-		test('Returns the length of the attribute "value" if value has not been set using the property.', () => {
+		it('Returns the length of the attribute "value" if value has not been set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			expect(element.selectionStart).toBe(10);
 		});
 
-		test('Returns the length of the value set using the property.', () => {
+		it('Returns the length of the value set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionStart = 5;
 			expect(element.selectionStart).toBe(5);
@@ -204,13 +204,13 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('set selectionStart()', () => {
-		test('Sets the value to the length of the property "value" if it is out of range.', () => {
+		it('Sets the value to the length of the property "value" if it is out of range.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionStart = 20;
 			expect(element.selectionStart).toBe(10);
 		});
 
-		test('Sets the property.', () => {
+		it('Sets the property.', () => {
 			element.value = 'TEST_VALUE';
 			element.selectionStart = 5;
 			expect(element.selectionStart).toBe(5);
@@ -218,12 +218,12 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('get selectionEnd()', () => {
-		test('Returns the length of the attribute "value" if value has not been set using the property.', () => {
+		it('Returns the length of the attribute "value" if value has not been set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			expect(element.selectionEnd).toBe(10);
 		});
 
-		test('Returns the length of the value set using the property.', () => {
+		it('Returns the length of the value set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionEnd = 5;
 			expect(element.selectionEnd).toBe(5);
@@ -231,7 +231,7 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('get form()', () => {
-		test('Returns parent form element.', () => {
+		it('Returns parent form element.', () => {
 			const form = document.createElement('form');
 			const div = document.createElement('div');
 			div.appendChild(element);
@@ -241,13 +241,13 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('set selectionEnd()', () => {
-		test('Sets the value to the length of the property "value" if it is out of range.', () => {
+		it('Sets the value to the length of the property "value" if it is out of range.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionEnd = 20;
 			expect(element.selectionEnd).toBe(10);
 		});
 
-		test('Sets the property.', () => {
+		it('Sets the property.', () => {
 			element.value = 'TEST_VALUE';
 			element.selectionEnd = 5;
 			expect(element.selectionEnd).toBe(5);
@@ -264,7 +264,7 @@ describe('HTMLInputElement', () => {
 		'readOnly'
 	]) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe(false);
 				element.setAttribute(property, '');
 				expect(element[property]).toBe(true);
@@ -272,7 +272,7 @@ describe('HTMLInputElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = true;
 				expect(element.getAttribute(property)).toBe('');
 			});
@@ -294,7 +294,7 @@ describe('HTMLInputElement', () => {
 		'inputmode'
 	]) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe('');
 				element.setAttribute(property, 'value');
 				expect(element[property]).toBe('value');
@@ -302,7 +302,7 @@ describe('HTMLInputElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 'value';
 				expect(element.getAttribute(property)).toBe('value');
 			});
@@ -311,7 +311,7 @@ describe('HTMLInputElement', () => {
 
 	for (const property of ['height', 'width']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe(0);
 				element[property] = 20;
 				expect(element[property]).toBe(20);
@@ -319,7 +319,7 @@ describe('HTMLInputElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element.setAttribute(property, '50');
 				expect(element[property]).toBe(0);
 				element[property] = 50;
@@ -331,7 +331,7 @@ describe('HTMLInputElement', () => {
 
 	for (const property of ['minLength', 'maxLength']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe(-1);
 				element.setAttribute(property, '50');
 				expect(element[property]).toBe(50);
@@ -339,7 +339,7 @@ describe('HTMLInputElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 50;
 				expect(element[property]).toBe(50);
 				expect(element.getAttribute(property)).toBe('50');
@@ -348,7 +348,7 @@ describe('HTMLInputElement', () => {
 	}
 
 	describe('get type()', () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.type).toBe('text');
 			element.setAttribute('type', 'date');
 			expect(element.type).toBe('date');
@@ -356,14 +356,14 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('set type()', () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.type = 'date';
 			expect(element.getAttribute('type')).toBe('date');
 		});
 	});
 
 	describe('get size()', () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.size).toBe(20);
 			element.size = 50;
 			expect(element.size).toBe(50);
@@ -371,7 +371,7 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('set size()', () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.setAttribute('size', '50');
 			expect(element.size).toBe(50);
 			element.size = 60;
@@ -381,7 +381,7 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('setSelectionRange()', () => {
-		test('Sets selection range.', () => {
+		it('Sets selection range.', () => {
 			element.value = 'TEST_VALUE';
 			element.setSelectionRange(1, 5, 'forward');
 			expect(element.selectionStart).toBe(1);
@@ -389,7 +389,7 @@ describe('HTMLInputElement', () => {
 			expect(element.selectionDirection).toBe('forward');
 		});
 
-		test('Sets selection end to the value length if out of range.', () => {
+		it('Sets selection end to the value length if out of range.', () => {
 			element.value = 'TEST_VALUE';
 			element.setSelectionRange(1, 100, 'backward');
 			expect(element.selectionStart).toBe(1);
@@ -399,7 +399,7 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('setRangeText()', () => {
-		test('Sets a range text with selection mode set to "preserve".', () => {
+		it('Sets a range text with selection mode set to "preserve".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5);
 			expect(element.selectionStart).toBe(14);
@@ -407,7 +407,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "select".', () => {
+		it('Sets a range text with selection mode set to "select".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.select);
 			expect(element.selectionStart).toBe(4);
@@ -415,7 +415,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "start".', () => {
+		it('Sets a range text with selection mode set to "start".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.start);
 			expect(element.selectionStart).toBe(4);
@@ -423,7 +423,7 @@ describe('HTMLInputElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "end".', () => {
+		it('Sets a range text with selection mode set to "end".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.end);
 			expect(element.selectionStart).toBe(14);
@@ -433,7 +433,7 @@ describe('HTMLInputElement', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones when type is "checkbox".', () => {
+		it('Clones when type is "checkbox".', () => {
 			element.type = 'checkbox';
 
 			const clone = element.cloneNode(true);
@@ -451,7 +451,7 @@ describe('HTMLInputElement', () => {
 			expect(clone.selectionDirection).toBe(element.selectionDirection);
 		});
 
-		test('Clones when type is "search".', () => {
+		it('Clones when type is "search".', () => {
 			element.type = 'search';
 			element.value = 'TEST_VALUE';
 			element.selectionStart = 4;
@@ -472,7 +472,7 @@ describe('HTMLInputElement', () => {
 			expect(clone.selectionDirection).toBe(element.selectionDirection);
 		});
 
-		test('Clones when type is "file".', () => {
+		it('Clones when type is "file".', () => {
 			element.type = 'file';
 			element.files.push(new File(['test'], 'file.jpg'));
 
diff --git a/packages/happy-dom/test/nodes/html-link-element/HTMLLinkElement.test.ts b/packages/happy-dom/test/nodes/html-link-element/HTMLLinkElement.test.ts
index ae0bc128..e4dea9e7 100644
--- a/packages/happy-dom/test/nodes/html-link-element/HTMLLinkElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-link-element/HTMLLinkElement.test.ts
@@ -27,7 +27,7 @@ describe('HTMLLinkElement', () => {
 		'type'
 	]) {
 		describe(`get ${property}()`, () => {
-			test(`Returns the "${property}" attribute.`, () => {
+			it(`Returns the "${property}" attribute.`, () => {
 				const element = document.createElement('link');
 				element.setAttribute(property, 'test');
 				expect(element[property]).toBe('test');
@@ -35,7 +35,7 @@ describe('HTMLLinkElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the attribute "${property}".`, () => {
+			it(`Sets the attribute "${property}".`, () => {
 				const element = document.createElement('link');
 				element[property] = 'test';
 				expect(element.getAttribute(property)).toBe('test');
@@ -44,7 +44,7 @@ describe('HTMLLinkElement', () => {
 	}
 
 	describe('get href()', () => {
-		test('Returns the "href" attribute.', () => {
+		it('Returns the "href" attribute.', () => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			element.setAttribute('href', 'test');
 			expect(element.href).toBe('test');
@@ -52,13 +52,13 @@ describe('HTMLLinkElement', () => {
 	});
 
 	describe('set href()', () => {
-		test('Sets the attribute "href".', () => {
+		it('Sets the attribute "href".', () => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			element.href = 'test';
 			expect(element.getAttribute('href')).toBe('test');
 		});
 
-		test('Loads and evaluates an external CSS file when the attribute "href" and "rel" is set and the element is connected to DOM.', done => {
+		it('Loads and evaluates an external CSS file when the attribute "href" and "rel" is set and the element is connected to DOM.', done => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const css = 'div { background: red; }';
 			let loadedOptions = null;
@@ -89,7 +89,7 @@ describe('HTMLLinkElement', () => {
 			}, 0);
 		});
 
-		test('Triggers error event when fetching a CSS file fails during setting the "href" and "rel" attributes.', done => {
+		it('Triggers error event when fetching a CSS file fails during setting the "href" and "rel" attributes.', done => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const thrownError = new Error('error');
 			let errorEvent = null;
@@ -114,7 +114,7 @@ describe('HTMLLinkElement', () => {
 			}, 0);
 		});
 
-		test('Does not load and evaluate external CSS files if the element is not connected to DOM.', () => {
+		it('Does not load and evaluate external CSS files if the element is not connected to DOM.', () => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const css = 'div { background: red; }';
 			let loadedOptions = null;
@@ -132,7 +132,7 @@ describe('HTMLLinkElement', () => {
 	});
 
 	describe('set isConnected()', () => {
-		test('Loads and evaluates an external script when "href" attribute has been set, but does not evaluate text content.', done => {
+		it('Loads and evaluates an external script when "href" attribute has been set, but does not evaluate text content.', done => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const css = 'div { background: red; }';
 			let loadEvent = null;
@@ -162,7 +162,7 @@ describe('HTMLLinkElement', () => {
 			}, 0);
 		});
 
-		test('Triggers error event when fetching a CSS file fails while appending the element to the document.', done => {
+		it('Triggers error event when fetching a CSS file fails while appending the element to the document.', done => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const thrownError = new Error('error');
 			let errorEvent = null;
@@ -186,7 +186,7 @@ describe('HTMLLinkElement', () => {
 			}, 0);
 		});
 
-		test('Does not load external scripts when "href" attribute has been set if the element is not connected to DOM.', () => {
+		it('Does not load external scripts when "href" attribute has been set if the element is not connected to DOM.', () => {
 			const element = <HTMLLinkElement>document.createElement('link');
 			const css = 'div { background: red; }';
 			let loadedOptions = null;
diff --git a/packages/happy-dom/test/nodes/html-script-element/HTMLScriptElement.test.ts b/packages/happy-dom/test/nodes/html-script-element/HTMLScriptElement.test.ts
index fbc6c94b..00d2ebe5 100644
--- a/packages/happy-dom/test/nodes/html-script-element/HTMLScriptElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-script-element/HTMLScriptElement.test.ts
@@ -18,7 +18,7 @@ describe('HTMLScriptElement', () => {
 
 	for (const property of ['type', 'charset', 'lang']) {
 		describe(`get ${property}()`, () => {
-			test(`Returns the "${property}" attribute.`, () => {
+			it(`Returns the "${property}" attribute.`, () => {
 				const element = document.createElement('script');
 				element.setAttribute(property, 'test');
 				expect(element[property]).toBe('test');
@@ -26,7 +26,7 @@ describe('HTMLScriptElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the attribute "${property}".`, () => {
+			it(`Sets the attribute "${property}".`, () => {
 				const element = document.createElement('script');
 				element[property] = 'test';
 				expect(element.getAttribute(property)).toBe('test');
@@ -36,7 +36,7 @@ describe('HTMLScriptElement', () => {
 
 	for (const property of ['async', 'defer']) {
 		describe(`get ${property}()`, () => {
-			test(`Returns "true" if the "${property}" attribute is defined.`, () => {
+			it(`Returns "true" if the "${property}" attribute is defined.`, () => {
 				const element = document.createElement('script');
 				element.setAttribute(property, '');
 				expect(element[property]).toBe(true);
@@ -44,7 +44,7 @@ describe('HTMLScriptElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the "${property}" attribute to an empty string if set to "true".`, () => {
+			it(`Sets the "${property}" attribute to an empty string if set to "true".`, () => {
 				const element = document.createElement('script');
 				element[property] = true;
 				expect(element.getAttribute(property)).toBe('');
@@ -53,7 +53,7 @@ describe('HTMLScriptElement', () => {
 	}
 
 	describe('get src()', () => {
-		test('Returns the "src" attribute.', () => {
+		it('Returns the "src" attribute.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			element.setAttribute('src', 'test');
 			expect(element.src).toBe('test');
@@ -61,13 +61,13 @@ describe('HTMLScriptElement', () => {
 	});
 
 	describe('set src()', () => {
-		test('Sets the attribute "src".', () => {
+		it('Sets the attribute "src".', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			element.src = 'test';
 			expect(element.getAttribute('src')).toBe('test');
 		});
 
-		test('Loads and evaluates an external script when the attribute "src" is set and the element is connected to DOM.', () => {
+		it('Loads and evaluates an external script when the attribute "src" is set and the element is connected to DOM.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			let loadedElement = null;
 
@@ -83,7 +83,7 @@ describe('HTMLScriptElement', () => {
 			expect(loadedElement).toBe(element);
 		});
 
-		test('Does not evaluate script if the element is not connected to DOM.', () => {
+		it('Does not evaluate script if the element is not connected to DOM.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			let loadedElement = null;
 
@@ -99,14 +99,14 @@ describe('HTMLScriptElement', () => {
 	});
 
 	describe('get text()', () => {
-		test('Returns the data of text nodes.', () => {
+		it('Returns the data of text nodes.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			const text = document.createTextNode('test');
 			element.appendChild(text);
 			expect(element.text).toBe('test');
 		});
 
-		test('Replaces all child nodes with a text node.', () => {
+		it('Replaces all child nodes with a text node.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			const text = document.createTextNode('test');
 			element.appendChild(text);
@@ -116,7 +116,7 @@ describe('HTMLScriptElement', () => {
 	});
 
 	describe('set isConnected()', () => {
-		test('Evaluates the text content as code when appended to an element that is connected to the document.', () => {
+		it('Evaluates the text content as code when appended to an element that is connected to the document.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			element.text = 'global.test = "test";';
 			document.body.appendChild(element);
@@ -124,7 +124,7 @@ describe('HTMLScriptElement', () => {
 			delete global['test'];
 		});
 
-		test('Evaluates the text content as code when inserted before an element that is connected to the document.', () => {
+		it('Evaluates the text content as code when inserted before an element that is connected to the document.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
@@ -141,21 +141,21 @@ describe('HTMLScriptElement', () => {
 			delete global['test'];
 		});
 
-		test('Does not evaluate code when added as innerHTML.', () => {
+		it('Does not evaluate code when added as innerHTML.', () => {
 			const div = document.createElement('div');
 			div.innerHTML = '<script>global.test = "test";</script>';
 			document.body.appendChild(div);
 			expect(global['test']).toBe(undefined);
 		});
 
-		test('Does not evaluate code when added as outerHTML.', () => {
+		it('Does not evaluate code when added as outerHTML.', () => {
 			const div = document.createElement('div');
 			document.body.appendChild(div);
 			div.outerHTML = '<script>global.test = "test";</script>';
 			expect(global['test']).toBe(undefined);
 		});
 
-		test('Does not evaluate code if the element is not connected to DOM.', () => {
+		it('Does not evaluate code if the element is not connected to DOM.', () => {
 			const div = document.createElement('div');
 			const element = <HTMLScriptElement>document.createElement('script');
 			element.text = 'global.test = "test";';
@@ -163,20 +163,20 @@ describe('HTMLScriptElement', () => {
 			expect(global['test']).toBe(undefined);
 		});
 
-		test('Evaluates the text content as code when using document.write().', () => {
+		it('Evaluates the text content as code when using document.write().', () => {
 			document.write('<script>global.test = "test";</script>');
 			expect(global['test']).toBe('test');
 			delete global['test'];
 		});
 
-		test('Evaluates the text content as code when using DOMParser.parseFromString().', () => {
+		it('Evaluates the text content as code when using DOMParser.parseFromString().', () => {
 			const domParser = new window.DOMParser();
 			domParser.parseFromString('<script>global.test = "test";</script>', 'text/html');
 			expect(global['test']).toBe('test');
 			delete global['test'];
 		});
 
-		test('Loads and evaluates an external script when "src" attribute has been set, but does not evaluate text content.', () => {
+		it('Loads and evaluates an external script when "src" attribute has been set, but does not evaluate text content.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			let loadedElement = null;
 
@@ -193,7 +193,7 @@ describe('HTMLScriptElement', () => {
 			expect(loadedElement).toBe(element);
 		});
 
-		test('Does not load external scripts when "src" attribute has been set if the element is not connected to DOM.', () => {
+		it('Does not load external scripts when "src" attribute has been set if the element is not connected to DOM.', () => {
 			const element = <HTMLScriptElement>document.createElement('script');
 			let loadedElement = null;
 
diff --git a/packages/happy-dom/test/nodes/html-script-element/ScriptUtility.test.ts b/packages/happy-dom/test/nodes/html-script-element/ScriptUtility.test.ts
index bd1687ad..0ef66fff 100644
--- a/packages/happy-dom/test/nodes/html-script-element/ScriptUtility.test.ts
+++ b/packages/happy-dom/test/nodes/html-script-element/ScriptUtility.test.ts
@@ -16,7 +16,7 @@ describe('ScriptUtility', () => {
 	});
 
 	describe('loadExternalScript()', () => {
-		test('Loads external script asynchronously.', async () => {
+		it('Loads external script asynchronously.', async () => {
 			let fetchedURL = null;
 			let loadEvent = null;
 
@@ -44,7 +44,7 @@ describe('ScriptUtility', () => {
 			delete global['test'];
 		});
 
-		test('Triggers error event when loading external script asynchronously.', async () => {
+		it('Triggers error event when loading external script asynchronously.', async () => {
 			let errorEvent = null;
 
 			jest.spyOn(window, 'fetch').mockImplementation(() => {
@@ -69,7 +69,7 @@ describe('ScriptUtility', () => {
 			);
 		});
 
-		test('Loads external script synchronously with relative URL.', async () => {
+		it('Loads external script synchronously with relative URL.', async () => {
 			let fetchedOptions = null;
 			let loadEvent = null;
 
@@ -98,7 +98,7 @@ describe('ScriptUtility', () => {
 			delete global['test'];
 		});
 
-		test('Triggers error event when loading external script synchronously with relative URL.', () => {
+		it('Triggers error event when loading external script synchronously with relative URL.', () => {
 			const thrownError = new Error('error');
 			let errorEvent = null;
 
diff --git a/packages/happy-dom/test/nodes/html-style-element/HTMLStyleElement.test.ts b/packages/happy-dom/test/nodes/html-style-element/HTMLStyleElement.test.ts
index b76b893f..3efcd2a5 100644
--- a/packages/happy-dom/test/nodes/html-style-element/HTMLStyleElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-style-element/HTMLStyleElement.test.ts
@@ -19,14 +19,14 @@ describe('HTMLStyleElement', () => {
 
 	for (const property of ['media', 'type']) {
 		describe(`get ${property}()`, () => {
-			test(`Returns the "${property}" attribute.`, () => {
+			it(`Returns the "${property}" attribute.`, () => {
 				element.setAttribute(property, 'test');
 				expect(element[property]).toBe('test');
 			});
 		});
 
 		describe(`set ${property}()`, () => {
-			test(`Sets the attribute "${property}".`, () => {
+			it(`Sets the attribute "${property}".`, () => {
 				element[property] = 'test';
 				expect(element.getAttribute(property)).toBe('test');
 			});
@@ -34,7 +34,7 @@ describe('HTMLStyleElement', () => {
 	}
 
 	describe(`get disabled()`, () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.disabled).toBe(false);
 			element.setAttribute('disabled', '');
 			expect(element.disabled).toBe(true);
@@ -42,18 +42,18 @@ describe('HTMLStyleElement', () => {
 	});
 
 	describe(`set disabled()`, () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.disabled = true;
 			expect(element.getAttribute('disabled')).toBe('');
 		});
 	});
 
 	describe(`get sheet()`, () => {
-		test('Returns "null" if not connected to DOM.', () => {
+		it('Returns "null" if not connected to DOM.', () => {
 			expect(element.sheet).toBe(null);
 		});
 
-		test('Returns an CSSStyleSheet instance with its text content as style rules.', () => {
+		it('Returns an CSSStyleSheet instance with its text content as style rules.', () => {
 			const textNode = document.createTextNode(
 				'body { background-color: red }\ndiv { background-color: green }'
 			);
diff --git a/packages/happy-dom/test/nodes/html-text-area-element/HTMLTextAreaElement.test.ts b/packages/happy-dom/test/nodes/html-text-area-element/HTMLTextAreaElement.test.ts
index e26552af..d655842b 100644
--- a/packages/happy-dom/test/nodes/html-text-area-element/HTMLTextAreaElement.test.ts
+++ b/packages/happy-dom/test/nodes/html-text-area-element/HTMLTextAreaElement.test.ts
@@ -16,19 +16,19 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('get value()', () => {
-		test('Returns the attribute "value" if it has not been set using the property.', () => {
+		it('Returns the attribute "value" if it has not been set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			expect(element.value).toBe('TEST_VALUE');
 		});
 
-		test('Returns value set using the property.', () => {
+		it('Returns value set using the property.', () => {
 			element.value = 'TEST_VALUE';
 			expect(element.value).toBe('TEST_VALUE');
 		});
 	});
 
 	describe('set value()', () => {
-		test('Sets a value and selection range.', () => {
+		it('Sets a value and selection range.', () => {
 			element.selectionDirection = HTMLInputElementSelectionDirectionEnum.forward;
 			element.value = 'TEST_VALUE';
 			expect(element.value).toBe('TEST_VALUE');
@@ -39,12 +39,12 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('get selectionStart()', () => {
-		test('Returns the length of the attribute "value" if value has not been set using the property.', () => {
+		it('Returns the length of the attribute "value" if value has not been set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			expect(element.selectionStart).toBe(10);
 		});
 
-		test('Returns the length of the value set using the property.', () => {
+		it('Returns the length of the value set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionStart = 5;
 			expect(element.selectionStart).toBe(5);
@@ -52,13 +52,13 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('set selectionStart()', () => {
-		test('Sets the value to the length of the property "value" if it is out of range.', () => {
+		it('Sets the value to the length of the property "value" if it is out of range.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionStart = 20;
 			expect(element.selectionStart).toBe(10);
 		});
 
-		test('Sets the property.', () => {
+		it('Sets the property.', () => {
 			element.value = 'TEST_VALUE';
 			element.selectionStart = 5;
 			expect(element.selectionStart).toBe(5);
@@ -66,12 +66,12 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('get selectionEnd()', () => {
-		test('Returns the length of the attribute "value" if value has not been set using the property.', () => {
+		it('Returns the length of the attribute "value" if value has not been set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			expect(element.selectionEnd).toBe(10);
 		});
 
-		test('Returns the length of the value set using the property.', () => {
+		it('Returns the length of the value set using the property.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionEnd = 5;
 			expect(element.selectionEnd).toBe(5);
@@ -79,13 +79,13 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('set selectionEnd()', () => {
-		test('Sets the value to the length of the property "value" if it is out of range.', () => {
+		it('Sets the value to the length of the property "value" if it is out of range.', () => {
 			element.setAttribute('value', 'TEST_VALUE');
 			element.selectionEnd = 20;
 			expect(element.selectionEnd).toBe(10);
 		});
 
-		test('Sets the property.', () => {
+		it('Sets the property.', () => {
 			element.value = 'TEST_VALUE';
 			element.selectionEnd = 5;
 			expect(element.selectionEnd).toBe(5);
@@ -94,7 +94,7 @@ describe('HTMLTextAreaElement', () => {
 
 	for (const property of ['disabled', 'autofocus', 'required', 'readOnly']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe(false);
 				element.setAttribute(property, '');
 				expect(element[property]).toBe(true);
@@ -102,7 +102,7 @@ describe('HTMLTextAreaElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = true;
 				expect(element.getAttribute(property)).toBe('');
 			});
@@ -111,7 +111,7 @@ describe('HTMLTextAreaElement', () => {
 
 	for (const property of ['name', 'autocomplete', 'cols', 'rows', 'placeholder']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe('');
 				element.setAttribute(property, 'value');
 				expect(element[property]).toBe('value');
@@ -119,7 +119,7 @@ describe('HTMLTextAreaElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 'value';
 				expect(element.getAttribute(property)).toBe('value');
 			});
@@ -128,7 +128,7 @@ describe('HTMLTextAreaElement', () => {
 
 	for (const property of ['minLength', 'maxLength']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe(-1);
 				element.setAttribute(property, '50');
 				expect(element[property]).toBe(50);
@@ -136,7 +136,7 @@ describe('HTMLTextAreaElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 50;
 				expect(element[property]).toBe(50);
 				expect(element.getAttribute(property)).toBe('50');
@@ -145,7 +145,7 @@ describe('HTMLTextAreaElement', () => {
 	}
 
 	describe('setSelectionRange()', () => {
-		test('Sets selection range.', () => {
+		it('Sets selection range.', () => {
 			element.value = 'TEST_VALUE';
 			element.setSelectionRange(1, 5, 'forward');
 			expect(element.selectionStart).toBe(1);
@@ -153,7 +153,7 @@ describe('HTMLTextAreaElement', () => {
 			expect(element.selectionDirection).toBe('forward');
 		});
 
-		test('Sets selection end to the value length if out of range.', () => {
+		it('Sets selection end to the value length if out of range.', () => {
 			element.value = 'TEST_VALUE';
 			element.setSelectionRange(1, 100, 'backward');
 			expect(element.selectionStart).toBe(1);
@@ -163,7 +163,7 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('setRangeText()', () => {
-		test('Sets a range text with selection mode set to "preserve".', () => {
+		it('Sets a range text with selection mode set to "preserve".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5);
 			expect(element.selectionStart).toBe(14);
@@ -171,7 +171,7 @@ describe('HTMLTextAreaElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "select".', () => {
+		it('Sets a range text with selection mode set to "select".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.select);
 			expect(element.selectionStart).toBe(4);
@@ -179,7 +179,7 @@ describe('HTMLTextAreaElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "start".', () => {
+		it('Sets a range text with selection mode set to "start".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.start);
 			expect(element.selectionStart).toBe(4);
@@ -187,7 +187,7 @@ describe('HTMLTextAreaElement', () => {
 			expect(element.value).toBe('TEST_NEW_VALUE');
 		});
 
-		test('Sets a range text with selection mode set to "end".', () => {
+		it('Sets a range text with selection mode set to "end".', () => {
 			element.value = 'TEST_VALUE';
 			element.setRangeText('_NEW_', 4, 5, HTMLInputElementSelectionModeEnum.end);
 			expect(element.selectionStart).toBe(14);
@@ -197,7 +197,7 @@ describe('HTMLTextAreaElement', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones node.', () => {
+		it('Clones node.', () => {
 			element.value = 'TEST_VALUE';
 			element.selectionStart = 4;
 			element.selectionEnd = 4;
diff --git a/packages/happy-dom/test/nodes/node/Node.test.ts b/packages/happy-dom/test/nodes/node/Node.test.ts
index 66f1fb9a..bd412ddc 100644
--- a/packages/happy-dom/test/nodes/node/Node.test.ts
+++ b/packages/happy-dom/test/nodes/node/Node.test.ts
@@ -3,6 +3,9 @@ import Node from '../../../src/nodes/node/Node';
 import HTMLElement from '../../../src/nodes/html-element/HTMLElement';
 import Event from '../../../src/event/Event';
 
+/**
+ *
+ */
 class CustomCounterElement extends HTMLElement {
 	public static output = [];
 
@@ -15,7 +18,7 @@ class CustomCounterElement extends HTMLElement {
 	}
 
 	/**
-	 * Connected
+	 * Connected.
 	 */
 	public connectedCallback(): void {
 		this.shadowRoot.innerHTML = '<div><span>Test</span></div>';
@@ -23,25 +26,28 @@ class CustomCounterElement extends HTMLElement {
 	}
 
 	/**
-	 * Disconnected
+	 * Disconnected.
 	 */
 	public disconnectedCallback(): void {
 		(<typeof CustomCounterElement>this.constructor).output.push('Counter:disconnected');
 	}
 }
 
+/**
+ *
+ */
 class CustomButtonElement extends HTMLElement {
 	public static output = [];
 
 	/**
-	 * Connected
+	 * Connected.
 	 */
 	public connectedCallback(): void {
 		(<typeof CustomButtonElement>this.constructor).output.push('Button:connected');
 	}
 
 	/**
-	 * Disconnected
+	 * Disconnected.
 	 */
 	public disconnectedCallback(): void {
 		(<typeof CustomButtonElement>this.constructor).output.push('Button:disconnected');
@@ -49,7 +55,9 @@ class CustomButtonElement extends HTMLElement {
 }
 
 describe('Node', () => {
-	let window, document, customElementOutput;
+	let window;
+	let document;
+	let customElementOutput;
 
 	beforeEach(() => {
 		window = new Window();
@@ -66,7 +74,7 @@ describe('Node', () => {
 	});
 
 	describe('get isConnected()', () => {
-		test('Returns "true" if the node is connected to the document.', () => {
+		it('Returns "true" if the node is connected to the document.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			const text = document.createTextNode('text');
@@ -87,7 +95,7 @@ describe('Node', () => {
 	});
 
 	describe('set isConnected()', () => {
-		test('Sets an element and all its children to be connected.', () => {
+		it('Sets an element and all its children to be connected.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			const text = document.createTextNode('text');
@@ -104,19 +112,19 @@ describe('Node', () => {
 	});
 
 	describe('get nodeValue()', () => {
-		test('Returns null.', () => {
+		it('Returns null.', () => {
 			expect(new Node().nodeValue).toBe(null);
 		});
 	});
 
 	describe('get nodeName()', () => {
-		test('Returns emptry string.', () => {
+		it('Returns emptry string.', () => {
 			expect(new Node().nodeName).toBe('');
 		});
 	});
 
 	describe('get previousSibling()', () => {
-		test('Returns previous sibling.', () => {
+		it('Returns previous sibling.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -131,7 +139,7 @@ describe('Node', () => {
 	});
 
 	describe('get nextSibling()', () => {
-		test('Returns next sibling.', () => {
+		it('Returns next sibling.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -146,7 +154,7 @@ describe('Node', () => {
 	});
 
 	describe('get firstChild()', () => {
-		test('Returns the first child node.', () => {
+		it('Returns the first child node.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -161,7 +169,7 @@ describe('Node', () => {
 	});
 
 	describe('get lastChild()', () => {
-		test('Returns the last child node.', () => {
+		it('Returns the last child node.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const span2 = document.createElement('span');
@@ -176,7 +184,7 @@ describe('Node', () => {
 	});
 
 	describe('get parentElement()', () => {
-		test('Returns parent element.', () => {
+		it('Returns parent element.', () => {
 			const div = document.createElement('div');
 			const span1 = document.createElement('span');
 			const text = document.createTextNode('text');
@@ -187,7 +195,7 @@ describe('Node', () => {
 			expect(text.parentElement).toBe(span1);
 		});
 
-		test('Returns null if there is no parent node.', () => {
+		it('Returns null if there is no parent node.', () => {
 			const text = document.createTextNode('text');
 
 			expect(text.parentElement).toBe(null);
@@ -195,7 +203,7 @@ describe('Node', () => {
 	});
 
 	describe('connectedCallback()', () => {
-		test('Calls connected callback when a custom element is connected to DOM.', () => {
+		it('Calls connected callback when a custom element is connected to DOM.', () => {
 			document.body.innerHTML = '<custom-counter><custom-button></custom-button></custom-counter>';
 			document.body.innerHTML = '';
 			expect(customElementOutput).toEqual([
@@ -208,7 +216,7 @@ describe('Node', () => {
 	});
 
 	describe('disconnectedCallback()', () => {
-		test('Calls disconnected callback when a custom element is connected to DOM.', () => {
+		it('Calls disconnected callback when a custom element is connected to DOM.', () => {
 			const customElement = document.createElement('custom-counter');
 			let isConnected = false;
 			let isDisconnected = false;
@@ -233,7 +241,7 @@ describe('Node', () => {
 	});
 
 	describe('getRootNode()', () => {
-		test('Returns ShadowRoot when used on a node inside a ShadowRoot.', () => {
+		it('Returns ShadowRoot when used on a node inside a ShadowRoot.', () => {
 			const customElement = document.createElement('custom-counter');
 
 			document.body.appendChild(customElement);
@@ -243,7 +251,7 @@ describe('Node', () => {
 			expect(rootNode).toBe(customElement.shadowRoot);
 		});
 
-		test('Returns Document when used on a node inside a ShadowRoot and the option "composed" is set to "true".', () => {
+		it('Returns Document when used on a node inside a ShadowRoot and the option "composed" is set to "true".', () => {
 			const customElement = document.createElement('custom-counter');
 
 			document.body.appendChild(customElement);
@@ -255,7 +263,7 @@ describe('Node', () => {
 			expect(rootNode).toBe(document);
 		});
 
-		test('Returns Document when the node is not inside a ShadowRoot.', () => {
+		it('Returns Document when the node is not inside a ShadowRoot.', () => {
 			const divElement = document.createElement('div');
 			const spanElement = document.createElement('span');
 
@@ -269,7 +277,7 @@ describe('Node', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Makes a shallow clone of a node (default behavior).', () => {
+		it('Makes a shallow clone of a node (default behavior).', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			const text = document.createTextNode('text');
@@ -291,7 +299,7 @@ describe('Node', () => {
 			expect(div !== clone).toBe(true);
 		});
 
-		test('Makes a deep clone of a node.', () => {
+		it('Makes a deep clone of a node.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 			const text = document.createTextNode('text');
@@ -317,7 +325,7 @@ describe('Node', () => {
 	});
 
 	describe('appendChild()', () => {
-		test('Appends an Node to another Node.', () => {
+		it('Appends an Node to another Node.', () => {
 			const child = document.createElement('span');
 			const parent1 = document.createElement('div');
 			const parent2 = document.createElement('div');
@@ -340,7 +348,7 @@ describe('Node', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Append the child nodes instead of the actual node if the type is DocumentFragment.', () => {
+		it('Append the child nodes instead of the actual node if the type is DocumentFragment.', () => {
 			const template = document.createElement('template');
 
 			template.innerHTML = '<div>Div</div><span>Span</span>';
@@ -356,7 +364,7 @@ describe('Node', () => {
 	});
 
 	describe('removeChild()', () => {
-		test('Removes a child Node from its parent and returns a reference to a removed node.', () => {
+		it('Removes a child Node from its parent and returns a reference to a removed node.', () => {
 			const child = document.createElement('span');
 			const parent = document.createElement('div');
 
@@ -380,7 +388,7 @@ describe('Node', () => {
 	});
 
 	describe('insertBefore()', () => {
-		test('Inserts a Node before another reference Node.', () => {
+		it('Inserts a Node before another reference Node.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const newNode = document.createElement('span');
@@ -400,7 +408,7 @@ describe('Node', () => {
 		});
 
 		// See: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
-		test('Insert the child nodes instead of the actual node before another reference Node if the type is DocumentFragment.', () => {
+		it('Insert the child nodes instead of the actual node before another reference Node if the type is DocumentFragment.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const template = document.createElement('template');
@@ -420,7 +428,7 @@ describe('Node', () => {
 			);
 		});
 
-		test('Inserts a Node after all children if no reference given.', () => {
+		it('Inserts a Node after all children if no reference given.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const newNode = document.createElement('span');
@@ -442,7 +450,7 @@ describe('Node', () => {
 	});
 
 	describe('replaceChild()', () => {
-		test('Inserts a Node before another reference Node.', () => {
+		it('Inserts a Node before another reference Node.', () => {
 			const child1 = document.createElement('span');
 			const child2 = document.createElement('span');
 			const newNode = document.createElement('span');
@@ -463,7 +471,7 @@ describe('Node', () => {
 	});
 
 	describe('dispatchEvent()', () => {
-		test('Dispatches an event that is set to not bubble.', () => {
+		it('Dispatches an event that is set to not bubble.', () => {
 			const child = document.createElement('span');
 			const parent = document.createElement('div');
 			const event = new Event('click', { bubbles: false });
@@ -483,7 +491,7 @@ describe('Node', () => {
 			expect(parentEvent).toBe(null);
 		});
 
-		test('Dispatches an event that is set to bubble.', () => {
+		it('Dispatches an event that is set to bubble.', () => {
 			const child = document.createElement('span');
 			const parent = document.createElement('div');
 			const event = new Event('click', { bubbles: true });
@@ -503,7 +511,7 @@ describe('Node', () => {
 			expect(parentEvent.currentTarget).toBe(parent);
 		});
 
-		test('Does not bubble to parent if propagation is stopped.', () => {
+		it('Does not bubble to parent if propagation is stopped.', () => {
 			const child = document.createElement('span');
 			const parent = document.createElement('div');
 			const event = new Event('click', { bubbles: false });
@@ -524,7 +532,7 @@ describe('Node', () => {
 			expect(parentEvent).toBe(null);
 		});
 
-		test('Returns false if preventDefault() is called and the event is cancelable.', () => {
+		it('Returns false if preventDefault() is called and the event is cancelable.', () => {
 			const child = document.createElement('span');
 			const parent = document.createElement('div');
 			const event = new Event('click', { bubbles: true, cancelable: true });
diff --git a/packages/happy-dom/test/nodes/parent-node/ParentNodeUtility.test.ts b/packages/happy-dom/test/nodes/parent-node/ParentNodeUtility.test.ts
index 5534b4f3..1bcf1604 100644
--- a/packages/happy-dom/test/nodes/parent-node/ParentNodeUtility.test.ts
+++ b/packages/happy-dom/test/nodes/parent-node/ParentNodeUtility.test.ts
@@ -16,7 +16,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('append()', () => {
-		test('Appends a node after the last child of the ParentNode.', () => {
+		it('Appends a node after the last child of the ParentNode.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -32,7 +32,7 @@ describe('ParentNodeUtility', () => {
 			);
 		});
 
-		test('Appends a mixed list of Node and DOMString after the last child of the ParentNode', () => {
+		it('Appends a mixed list of Node and DOMString after the last child of the ParentNode', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -53,7 +53,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('prepend()', () => {
-		test('Prepends a node after the before the first child of the ParentNode.', () => {
+		it('Prepends a node after the before the first child of the ParentNode.', () => {
 			const parent = document.createElement('div');
 			const newChild = document.createElement('span');
 			newChild.className = 'child4';
@@ -69,7 +69,7 @@ describe('ParentNodeUtility', () => {
 			);
 		});
 
-		test('Prepends a mixed list of Node and DOMString before the first child of the ParentNode', () => {
+		it('Prepends a mixed list of Node and DOMString before the first child of the ParentNode', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -90,7 +90,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('replaceChildren()', () => {
-		test('Replaces the existing children of a ParentNode with a mixed list of Node and DOMString.', () => {
+		it('Replaces the existing children of a ParentNode with a mixed list of Node and DOMString.', () => {
 			const parent = document.createElement('div');
 			const newChildrenParent = document.createElement('div');
 			const newChildrenHtml =
@@ -114,7 +114,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('getElementsByClassName()', () => {
-		test('Returns elements by class name.', () => {
+		it('Returns elements by class name.', () => {
 			const parent = document.createElement('div');
 			const element = document.createElement('div');
 			const className = 'className';
@@ -130,7 +130,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('getElementsByTagName()', () => {
-		test('Returns elements by tag name.', () => {
+		it('Returns elements by tag name.', () => {
 			const parent = document.createElement('div');
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
@@ -158,7 +158,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('getElementsByTagNameNS()', () => {
-		test('Returns elements by tag name.', () => {
+		it('Returns elements by tag name.', () => {
 			const parent = document.createElement('div');
 			const div1 = document.createElementNS(NamespaceURI.svg, 'div');
 			const div2 = document.createElement('div');
@@ -184,7 +184,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('getElementByTagName()', () => {
-		test('Returns the first element matching a tag name.', () => {
+		it('Returns the first element matching a tag name.', () => {
 			const parent = document.createElement('div');
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
@@ -207,7 +207,7 @@ describe('ParentNodeUtility', () => {
 	});
 
 	describe('getElementById()', () => {
-		test('Returns the first element matching an id.', () => {
+		it('Returns the first element matching an id.', () => {
 			const parent = document.createElement('div');
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
diff --git a/packages/happy-dom/test/nodes/shadow-root/ShadowRoot.test.ts b/packages/happy-dom/test/nodes/shadow-root/ShadowRoot.test.ts
index 3db67524..c756eaaf 100644
--- a/packages/happy-dom/test/nodes/shadow-root/ShadowRoot.test.ts
+++ b/packages/happy-dom/test/nodes/shadow-root/ShadowRoot.test.ts
@@ -2,7 +2,8 @@ import Window from '../../../src/window/Window';
 import CustomElement from '../../CustomElement';
 
 describe('ShadowRoot', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -15,7 +16,7 @@ describe('ShadowRoot', () => {
 	});
 
 	describe('set innerHTML()', () => {
-		test('Sets the innerHTML of the shadow root.', () => {
+		it('Sets the innerHTML of the shadow root.', () => {
 			const shadowRoot = document.createElement('custom-element').shadowRoot;
 			shadowRoot.innerHTML = '<div attr1="value1" attr2="value2"><span>Test</span></div>';
 			expect(shadowRoot.childNodes.length).toBe(1);
@@ -26,7 +27,7 @@ describe('ShadowRoot', () => {
 	});
 
 	describe('get innerHTML()', () => {
-		test('Returns the innerHTML of the shadow root.', () => {
+		it('Returns the innerHTML of the shadow root.', () => {
 			const html = '<div attr1="value1" attr2="value2"><span>Test</span></div>';
 			const shadowRoot = document.createElement('custom-element').shadowRoot;
 			shadowRoot.innerHTML = html;
@@ -35,7 +36,7 @@ describe('ShadowRoot', () => {
 	});
 
 	describe('toString()', () => {
-		test('Returns the innerHTML of the shadow root.', () => {
+		it('Returns the innerHTML of the shadow root.', () => {
 			const html = '<div attr1="value1" attr2="value2"><span>Test</span></div>';
 			const shadowRoot = document.createElement('custom-element').shadowRoot;
 			shadowRoot.innerHTML = html;
@@ -44,7 +45,7 @@ describe('ShadowRoot', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones the value of the "mode" property when cloned.', () => {
+		it('Clones the value of the "mode" property when cloned.', () => {
 			const shadowRoot = document.createElement('custom-element').shadowRoot;
 			const clone = shadowRoot.cloneNode();
 			expect(shadowRoot.mode).toBe('closed');
diff --git a/packages/happy-dom/test/nodes/svg-element/SVGSVGElement.test.ts b/packages/happy-dom/test/nodes/svg-element/SVGSVGElement.test.ts
index aeac87e2..852904f7 100644
--- a/packages/happy-dom/test/nodes/svg-element/SVGSVGElement.test.ts
+++ b/packages/happy-dom/test/nodes/svg-element/SVGSVGElement.test.ts
@@ -23,7 +23,7 @@ describe('SVGSVGElement', () => {
 
 	for (const property of ['width', 'height', 'x', 'y', 'contentScriptType']) {
 		describe(`get ${property}()`, () => {
-			test('Returns attribute value.', () => {
+			it('Returns attribute value.', () => {
 				expect(element[property]).toBe('');
 				element.setAttribute(property, 'value');
 				expect(element[property]).toBe('value');
@@ -31,7 +31,7 @@ describe('SVGSVGElement', () => {
 		});
 
 		describe(`set ${property}()`, () => {
-			test('Sets attribute value.', () => {
+			it('Sets attribute value.', () => {
 				element[property] = 'value';
 				expect(element.getAttribute(property)).toBe('value');
 			});
@@ -39,7 +39,7 @@ describe('SVGSVGElement', () => {
 	}
 
 	describe('get preserveAspectRatio()', () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.preserveAspectRatio).toBe('xMidYMid meet');
 			element.setAttribute('preserveAspectRatio', 'xMidYMin');
 			expect(element.preserveAspectRatio).toBe('xMidYMin');
@@ -47,14 +47,14 @@ describe('SVGSVGElement', () => {
 	});
 
 	describe('set preserveAspectRatio()', () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.preserveAspectRatio = 'xMidYMin';
 			expect(element.getAttribute('preserveAspectRatio')).toBe('xMidYMin');
 		});
 	});
 
 	describe('get currentScale()', () => {
-		test('Returns attribute value.', () => {
+		it('Returns attribute value.', () => {
 			expect(element.currentScale).toBe(1);
 			element.currentScale = 2;
 			expect(element.currentScale).toBe(2);
@@ -62,7 +62,7 @@ describe('SVGSVGElement', () => {
 	});
 
 	describe('set currentScale()', () => {
-		test('Sets attribute value.', () => {
+		it('Sets attribute value.', () => {
 			element.setAttribute('currentScale', '2');
 			expect(element.currentScale).toBe(2);
 			element.currentScale = 3;
@@ -72,19 +72,19 @@ describe('SVGSVGElement', () => {
 	});
 
 	describe('get viewport()', () => {
-		test('Returns an instanceof SVGRect.', () => {
+		it('Returns an instanceof SVGRect.', () => {
 			expect(element.viewport instanceof SVGRect).toBe(true);
 		});
 	});
 
 	describe('get currentTranslate()', () => {
-		test('Returns an instanceof SVGPoint.', () => {
+		it('Returns an instanceof SVGPoint.', () => {
 			expect(element.currentTranslate instanceof SVGPoint).toBe(true);
 		});
 	});
 
 	describe('get viewBox()', () => {
-		test('Returns an instanceof SVGAnimatedRect with values from the attribute "viewBox".', () => {
+		it('Returns an instanceof SVGAnimatedRect with values from the attribute "viewBox".', () => {
 			element.setAttribute('viewBox', '0 0 100 100');
 			expect(element.viewBox instanceof SVGAnimatedRect).toBe(true);
 			expect(element.viewBox.baseVal).toEqual({
@@ -97,95 +97,95 @@ describe('SVGSVGElement', () => {
 	});
 
 	describe('pauseAnimations()', () => {
-		test('Exists and does nothing.', () => {
+		it('Exists and does nothing.', () => {
 			expect(typeof element.pauseAnimations).toBe('function');
 			element.pauseAnimations();
 		});
 	});
 
 	describe('unpauseAnimations()', () => {
-		test('Exists and does nothing.', () => {
+		it('Exists and does nothing.', () => {
 			expect(typeof element.unpauseAnimations).toBe('function');
 			element.unpauseAnimations();
 		});
 	});
 
 	describe('getCurrentTime()', () => {
-		test('Returns "0".', () => {
+		it('Returns "0".', () => {
 			expect(element.getCurrentTime()).toBe(0);
 		});
 	});
 
 	describe('setCurrentTime()', () => {
-		test('Exists and does nothing.', () => {
+		it('Exists and does nothing.', () => {
 			expect(typeof element.setCurrentTime).toBe('function');
 			element.setCurrentTime();
 		});
 	});
 
 	describe('getIntersectionList()', () => {
-		test('Returns an empty Array.', () => {
+		it('Returns an empty Array.', () => {
 			expect(element.getIntersectionList()).toEqual([]);
 		});
 	});
 
 	describe('getEnclosureList()', () => {
-		test('Returns an empty Array.', () => {
+		it('Returns an empty Array.', () => {
 			expect(element.getEnclosureList()).toEqual([]);
 		});
 	});
 
 	describe('checkIntersection()', () => {
-		test('Returns "false".', () => {
+		it('Returns "false".', () => {
 			expect(element.checkIntersection()).toBe(false);
 		});
 	});
 
 	describe('checkEnclosure()', () => {
-		test('Returns "false".', () => {
+		it('Returns "false".', () => {
 			expect(element.checkEnclosure()).toBe(false);
 		});
 	});
 
 	describe('deselectAll()', () => {
-		test('Exists and does nothing.', () => {
+		it('Exists and does nothing.', () => {
 			expect(typeof element.deselectAll).toBe('function');
 			element.deselectAll();
 		});
 	});
 
 	describe('createSVGNumber()', () => {
-		test('Returns an instance of SVGNumber.', () => {
+		it('Returns an instance of SVGNumber.', () => {
 			expect(element.createSVGNumber() instanceof SVGNumber).toBe(true);
 		});
 	});
 
 	describe('createSVGLength()', () => {
-		test('Returns an instance of SVGLength.', () => {
+		it('Returns an instance of SVGLength.', () => {
 			expect(element.createSVGLength() instanceof SVGLength).toBe(true);
 		});
 	});
 
 	describe('createSVGAngle()', () => {
-		test('Returns an instance of SVGAngle.', () => {
+		it('Returns an instance of SVGAngle.', () => {
 			expect(element.createSVGAngle() instanceof SVGAngle).toBe(true);
 		});
 	});
 
 	describe('createSVGPoint()', () => {
-		test('Returns an instance of SVGPoint.', () => {
+		it('Returns an instance of SVGPoint.', () => {
 			expect(element.createSVGPoint() instanceof SVGPoint).toBe(true);
 		});
 	});
 
 	describe('createSVGRect()', () => {
-		test('Returns an instance of SVGRect.', () => {
+		it('Returns an instance of SVGRect.', () => {
 			expect(element.createSVGRect() instanceof SVGRect).toBe(true);
 		});
 	});
 
 	describe('createSVGTransform()', () => {
-		test('Returns an instance of SVGTransform.', () => {
+		it('Returns an instance of SVGTransform.', () => {
 			expect(element.createSVGTransform() instanceof SVGTransform).toBe(true);
 		});
 	});
diff --git a/packages/happy-dom/test/nodes/text-node/TextNode.test.ts b/packages/happy-dom/test/nodes/text-node/TextNode.test.ts
index e4f82aa9..8db73acc 100644
--- a/packages/happy-dom/test/nodes/text-node/TextNode.test.ts
+++ b/packages/happy-dom/test/nodes/text-node/TextNode.test.ts
@@ -4,7 +4,8 @@ import Window from '../../../src/window/Window';
 import ChildNodeUtility from '../../../src/nodes/child-node/ChildNodeUtility';
 
 describe('TextNode', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -16,27 +17,27 @@ describe('TextNode', () => {
 	});
 
 	describe('get nodeName()', () => {
-		test('Returns "#text".', () => {
+		it('Returns "#text".', () => {
 			const node = document.createTextNode('test');
 			expect(node.nodeName).toBe('#text');
 		});
 	});
 	describe('get length()', () => {
-		test('Returns "#comment".', () => {
+		it('Returns "#comment".', () => {
 			const node = document.createTextNode('test');
 			expect(node.length).toBe(4);
 		});
 	});
 
 	describe('get textContent()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createTextNode('test');
 			expect(node.textContent).toBe('test');
 		});
 	});
 
 	describe('set textContent()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createTextNode('test');
 			node.textContent = 'new text';
 			expect(node.textContent).toBe('new text');
@@ -44,14 +45,14 @@ describe('TextNode', () => {
 	});
 
 	describe('get nodeValue()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createTextNode('test');
 			expect(node.nodeValue).toBe('test');
 		});
 	});
 
 	describe('set nodeValue()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createTextNode('test');
 			node.nodeValue = 'new text';
 			expect(node.nodeValue).toBe('new text');
@@ -59,14 +60,14 @@ describe('TextNode', () => {
 	});
 
 	describe('get data()', () => {
-		test('Returns text content.', () => {
+		it('Returns text content.', () => {
 			const node = document.createTextNode('test');
 			expect(node.data).toBe('test');
 		});
 	});
 
 	describe('set data()', () => {
-		test('Sets text content.', () => {
+		it('Sets text content.', () => {
 			const node = document.createTextNode('test');
 			node.data = 'new text';
 			expect(node.data).toBe('new text');
@@ -74,7 +75,7 @@ describe('TextNode', () => {
 	});
 
 	describe('get previousElementSibling()', () => {
-		test('Returns previous element sibling..', () => {
+		it('Returns previous element sibling..', () => {
 			const node = document.createTextNode('test');
 			const previousElementSibling = document.createElement('div');
 			jest
@@ -89,7 +90,7 @@ describe('TextNode', () => {
 	});
 
 	describe('get nextElementSibling()', () => {
-		test('Returns next element sibling..', () => {
+		it('Returns next element sibling..', () => {
 			const node = document.createTextNode('test');
 			const nextElementSibling = document.createElement('div');
 			jest
@@ -104,14 +105,14 @@ describe('TextNode', () => {
 	});
 
 	describe('toString()', () => {
-		test('Returns "[object Text]".', () => {
+		it('Returns "[object Text]".', () => {
 			const node = document.createTextNode('test');
 			expect(node.toString()).toBe('[object Text]');
 		});
 	});
 
 	describe('remove()', () => {
-		test('Removes the node from its parent.', () => {
+		it('Removes the node from its parent.', () => {
 			const text = document.createTextNode('test');
 			let isCalled = false;
 
@@ -126,7 +127,7 @@ describe('TextNode', () => {
 	});
 
 	describe('replaceWith()', () => {
-		test('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
+		it('Replaces a Node in the children list of its parent with a set of Node or DOMString objects.', () => {
 			const text = document.createTextNode('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -144,7 +145,7 @@ describe('TextNode', () => {
 	});
 
 	describe('before()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const text = document.createTextNode('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -162,7 +163,7 @@ describe('TextNode', () => {
 	});
 
 	describe('after()', () => {
-		test("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
+		it("Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.", () => {
 			const text = document.createTextNode('test');
 			const node1 = document.createComment('test1');
 			const node2 = document.createComment('test2');
@@ -179,7 +180,7 @@ describe('TextNode', () => {
 		});
 	});
 	describe('appendData()', () => {
-		test('Appends data.', () => {
+		it('Appends data.', () => {
 			const node = document.createTextNode('test');
 			const expectedData = 'data';
 			let isCalled = false;
@@ -196,7 +197,7 @@ describe('TextNode', () => {
 	});
 
 	describe('deleteData()', () => {
-		test('Deletes data.', () => {
+		it('Deletes data.', () => {
 			const node = document.createTextNode('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -217,7 +218,7 @@ describe('TextNode', () => {
 	});
 
 	describe('insertData()', () => {
-		test('Inserts data.', () => {
+		it('Inserts data.', () => {
 			const node = document.createTextNode('test');
 			const expectedOffset = -1;
 			const expectedData = 'data';
@@ -238,7 +239,7 @@ describe('TextNode', () => {
 	});
 
 	describe('replaceData()', () => {
-		test('Replaces data.', () => {
+		it('Replaces data.', () => {
 			const node = document.createTextNode('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -261,7 +262,7 @@ describe('TextNode', () => {
 	});
 
 	describe('substringData()', () => {
-		test('Returns a sub-string.', () => {
+		it('Returns a sub-string.', () => {
 			const node = document.createTextNode('test');
 			const expectedOffset = -1;
 			const expectedCount = -1;
@@ -280,7 +281,7 @@ describe('TextNode', () => {
 	});
 
 	describe('cloneNode()', () => {
-		test('Clones the node.', () => {
+		it('Clones the node.', () => {
 			const node = document.createTextNode('test');
 			const clone = node.cloneNode();
 			expect(clone.data).toBe(node.data);
diff --git a/packages/happy-dom/test/query-selector/QuerySelector.test.ts b/packages/happy-dom/test/query-selector/QuerySelector.test.ts
index 0c8a2cd3..67a8418b 100644
--- a/packages/happy-dom/test/query-selector/QuerySelector.test.ts
+++ b/packages/happy-dom/test/query-selector/QuerySelector.test.ts
@@ -4,7 +4,8 @@ import QuerySelectorHTML from './data/QuerySelectorHTML';
 import QuerySelectorNthChildHTML from './data/QuerySelectorNthChildHTML';
 
 describe('QuerySelector', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -12,7 +13,7 @@ describe('QuerySelector', () => {
 	});
 
 	describe('querySelectorAll', () => {
-		test('Returns all span elements.', () => {
+		it('Returns all span elements.', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span');
@@ -21,14 +22,14 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns a NodeList with the method item().', () => {
+		it('Returns a NodeList with the method item().', () => {
 			const container = <IHTMLElement>document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span');
 			expect(elements.item(0)).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all h1 (heading 1) elements.', () => {
+		it('Returns all h1 (heading 1) elements.', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('h1');
@@ -37,7 +38,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all elements with class name "class1".', () => {
+		it('Returns all elements with class name "class1".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('.class1');
@@ -48,7 +49,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with class name "class1 class2".', () => {
+		it('Returns all elements with class name "class1 class2".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('.class1.class2');
@@ -59,7 +60,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements matching ".class1 > .class1 > *".', () => {
+		it('Returns all elements matching ".class1 > .class1 > *".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('.class1 > .class1 > *');
@@ -68,7 +69,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements matching "div > div > span".', () => {
+		it('Returns all elements matching "div > div > span".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('div > div > span');
@@ -77,7 +78,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements matching "div > div > .class1.class2".', () => {
+		it('Returns all elements matching "div > div > .class1.class2".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('div > div > .class1.class2');
@@ -87,7 +88,7 @@ describe('QuerySelector', () => {
 			expect(elements[2]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with matching attributes using "[attr1="value1"]".', () => {
+		it('Returns all elements with matching attributes using "[attr1="value1"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[attr1="value1"]');
@@ -97,7 +98,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with multiple matching attributes using "[attr1="value1"][attr2="word1 word2"]".', () => {
+		it('Returns all elements with multiple matching attributes using "[attr1="value1"][attr2="word1 word2"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[attr1="value1"][attr2="word1 word2"]');
@@ -106,7 +107,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all elements with tag name and matching attributes using "span[attr1="value1"]".', () => {
+		it('Returns all elements with tag name and matching attributes using "span[attr1="value1"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span[attr1="value1"]');
@@ -116,7 +117,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with tag name and matching attributes using "span[attr1=value1]".', () => {
+		it('Returns all elements with tag name and matching attributes using "span[attr1=value1]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span[attr1=value1]');
@@ -126,7 +127,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with tag name and matching attributes using "span[attr1=\'value1\']".', () => {
+		it('Returns all elements with tag name and matching attributes using "span[attr1=\'value1\']".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll("span[attr1='value1']");
@@ -136,7 +137,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with tag name and matching attributes using "span[_attr1]".', () => {
+		it('Returns all elements with tag name and matching attributes using "span[_attr1]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML.replace(/ attr1/gm, '_attr1');
 			const elements = container.querySelectorAll('span[_attr1]');
@@ -146,7 +147,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with tag name and multiple matching attributes using "span[attr1="value1"][attr2="word1 word2"]".', () => {
+		it('Returns all elements with tag name and multiple matching attributes using "span[attr1="value1"][attr2="word1 word2"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span[attr1="value1"][attr2="word1 word2"]');
@@ -155,7 +156,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all elements with tag name and multiple matching attributes using "span[attr1="value1"][attr3="bracket[]bracket"]".', () => {
+		it('Returns all elements with tag name and multiple matching attributes using "span[attr1="value1"][attr3="bracket[]bracket"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span[attr1="value1"][attr3="bracket[]bracket"]');
@@ -164,7 +165,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all elements with an attribute value containing a specified word using "[class~="class2"]".', () => {
+		it('Returns all elements with an attribute value containing a specified word using "[class~="class2"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class~="class2"]');
@@ -176,7 +177,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value starting with the specified word using "[class|="class1"]".', () => {
+		it('Returns all elements with an attribute value starting with the specified word using "[class|="class1"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class|="class1"]');
@@ -188,7 +189,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value that begins with a specified value using "[class^="cl"]".', () => {
+		it('Returns all elements with an attribute value that begins with a specified value using "[class^="cl"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class^="cl"]');
@@ -200,7 +201,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value that ends with a specified value using "[class$="ss2"]".', () => {
+		it('Returns all elements with an attribute value that ends with a specified value using "[class$="ss2"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class$="ss2"]');
@@ -212,7 +213,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]".', () => {
+		it('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class*="s1 cl"]');
@@ -224,7 +225,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]" or matches exactly a value using "[attr1="value1"]".', () => {
+		it('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]" or matches exactly a value using "[attr1="value1"]".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class*="s1 cl"], [attr1="value1"]');
@@ -236,7 +237,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]" or has the tag "b".', () => {
+		it('Returns all elements with an attribute value that contains a specified value using "[class*="s1 cl"]" or has the tag "b".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('[class*="s1 cl"], h1');
@@ -250,7 +251,7 @@ describe('QuerySelector', () => {
 			expect(elements[5]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching ":first-child".', () => {
+		it('Returns all span elements matching ":first-child".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll(':first-child');
@@ -262,7 +263,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching "span:first-child".', () => {
+		it('Returns all span elements matching "span:first-child".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span:first-child');
@@ -271,7 +272,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all span elements matching ":last-child".', () => {
+		it('Returns all span elements matching ":last-child".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll(':last-child');
@@ -283,7 +284,7 @@ describe('QuerySelector', () => {
 			expect(elements[3]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching "span:last-child".', () => {
+		it('Returns all span elements matching "span:last-child".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span:last-child');
@@ -292,7 +293,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all span elements matching ":only-child".', () => {
+		it('Returns all span elements matching ":only-child".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll(':only-child');
@@ -301,7 +302,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching ":first-of-type".', () => {
+		it('Returns all span elements matching ":first-of-type".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll(':first-of-type');
@@ -314,7 +315,7 @@ describe('QuerySelector', () => {
 			expect(elements[4]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching "span:first-of-type".', () => {
+		it('Returns all span elements matching "span:first-of-type".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span:first-of-type');
@@ -323,7 +324,7 @@ describe('QuerySelector', () => {
 			expect(elements[0]).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns all span elements matching ":last-of-type".', () => {
+		it('Returns all span elements matching ":last-of-type".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll(':last-of-type');
@@ -336,7 +337,7 @@ describe('QuerySelector', () => {
 			expect(elements[4]).toBe(container.children[1].children[0]);
 		});
 
-		test('Returns all span elements matching span:nth-child(1) or span:nth-child(2).', () => {
+		it('Returns all span elements matching span:nth-child(1) or span:nth-child(2).', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const elements = container.querySelectorAll('span:nth-child(1), span:nth-child(2)');
@@ -346,7 +347,7 @@ describe('QuerySelector', () => {
 			expect(elements[1]).toBe(container.children[0].children[1].children[1]);
 		});
 
-		test('Returns all elements matching :nth-child(2n).', () => {
+		it('Returns all elements matching :nth-child(2n).', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-child(2n)');
@@ -356,7 +357,7 @@ describe('QuerySelector', () => {
 			).toEqual(['span.n2', 'b.n4', 'div.n6', 'span.n8', 'i.n10']);
 		});
 
-		test('Returns all elements matching "div :nth-child(2n+1)".', () => {
+		it('Returns all elements matching "div :nth-child(2n+1)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll('div :nth-child(2n+1)');
@@ -366,7 +367,7 @@ describe('QuerySelector', () => {
 			).toEqual(['div.', 'b.n1', 'div.n3', 'span.n5', 'b.n7', 'div.n9']);
 		});
 
-		test('Returns all elements matching "div :nth-child(3n+1)".', () => {
+		it('Returns all elements matching "div :nth-child(3n+1)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll('div :nth-child(3n+1)');
@@ -376,7 +377,7 @@ describe('QuerySelector', () => {
 			).toEqual(['div.', 'b.n1', 'b.n4', 'b.n7', 'i.n10']);
 		});
 
-		test('Returns all elements matching "div :nth-child(3n+3)".', () => {
+		it('Returns all elements matching "div :nth-child(3n+3)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll('div :nth-child(3n+3)');
@@ -386,7 +387,7 @@ describe('QuerySelector', () => {
 			).toEqual(['div.n3', 'div.n6', 'div.n9']);
 		});
 
-		test('Returns all elements matching ":nth-child(odd)".', () => {
+		it('Returns all elements matching ":nth-child(odd)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-child(odd)');
@@ -396,7 +397,7 @@ describe('QuerySelector', () => {
 			).toEqual(['div.', 'b.n1', 'div.n3', 'span.n5', 'b.n7', 'div.n9']);
 		});
 
-		test('Returns all elements matching ":nth-child(even)".', () => {
+		it('Returns all elements matching ":nth-child(even)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-child(even)');
@@ -406,7 +407,7 @@ describe('QuerySelector', () => {
 			).toEqual(['span.n2', 'b.n4', 'div.n6', 'span.n8', 'i.n10']);
 		});
 
-		test('Returns all elements matching ":nth-of-type(2n)".', () => {
+		it('Returns all elements matching ":nth-of-type(2n)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-of-type(2n)');
@@ -416,7 +417,7 @@ describe('QuerySelector', () => {
 			).toEqual(['b.n4', 'span.n5', 'div.n6']);
 		});
 
-		test('Returns all elements matching ":nth-of-type(odd)".', () => {
+		it('Returns all elements matching ":nth-of-type(odd)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-of-type(odd)');
@@ -426,7 +427,7 @@ describe('QuerySelector', () => {
 			).toEqual(['div.', 'b.n1', 'span.n2', 'div.n3', 'b.n7', 'span.n8', 'div.n9', 'i.n10']);
 		});
 
-		test('Returns all elements matching ":nth-last-child(2n)".', () => {
+		it('Returns all elements matching ":nth-last-child(2n)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-last-child(2n)');
@@ -436,7 +437,7 @@ describe('QuerySelector', () => {
 			).toEqual(['b.n1', 'div.n3', 'span.n5', 'b.n7', 'div.n9']);
 		});
 
-		test('Returns all elements matching ":nth-last-of-type(2n)".', () => {
+		it('Returns all elements matching ":nth-last-of-type(2n)".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorNthChildHTML;
 			const elements = container.querySelectorAll(':nth-last-of-type(2n)');
@@ -448,7 +449,7 @@ describe('QuerySelector', () => {
 	});
 
 	describe('querySelector', () => {
-		test('Returns a span matching "span".', () => {
+		it('Returns a span matching "span".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -457,7 +458,7 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('span')).toBe(span);
 		});
 
-		test('Returns span wkith a specific class name matching ".spanClass".', () => {
+		it('Returns span wkith a specific class name matching ".spanClass".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -467,7 +468,7 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('.spanClass')).toBe(span);
 		});
 
-		test('Returns span wkith a specific class name matching ".spanClass".', () => {
+		it('Returns span wkith a specific class name matching ".spanClass".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -477,7 +478,7 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('.spanClass')).toBe(span);
 		});
 
-		test('Returns span with a specific class name and tag name matching "span.spanClass".', () => {
+		it('Returns span with a specific class name and tag name matching "span.spanClass".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -487,7 +488,7 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('span.spanClass')).toBe(span);
 		});
 
-		test('Returns span with a specific tag name and attribute matching "span[attr1="value1"]".', () => {
+		it('Returns span with a specific tag name and attribute matching "span[attr1="value1"]".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -500,21 +501,21 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('[attr1]')).toBe(span);
 		});
 
-		test('Returns the first element matching "div > div > span".', () => {
+		it('Returns the first element matching "div > div > span".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const span = container.querySelector('div > div > span');
 			expect(span).toBe(container.children[0].children[1].children[0]);
 		});
 
-		test('Returns the first element matching "div > div > .class1.class2".', () => {
+		it('Returns the first element matching "div > div > .class1.class2".', () => {
 			const container = document.createElement('div');
 			container.innerHTML = QuerySelectorHTML;
 			const div = container.querySelector('div > div > .class1.class2');
 			expect(div).toBe(container.children[0].children[1]);
 		});
 
-		test('Returns the first element matching "*".', () => {
+		it('Returns the first element matching "*".', () => {
 			const div1 = document.createElement('div');
 			const div2 = document.createElement('div');
 			const span = document.createElement('span');
@@ -523,12 +524,12 @@ describe('QuerySelector', () => {
 			expect(div1.querySelector('*')).toBe(div2);
 		});
 
-		test('Returns "null" if no element is found.', () => {
+		it('Returns "null" if no element is found.', () => {
 			const div = document.createElement('div');
 			expect(div.querySelector('span')).toBe(null);
 		});
 
-		test('Returns an element by id matching "#id".', () => {
+		it('Returns an element by id matching "#id".', () => {
 			const div = document.createElement('div');
 			const div2 = document.createElement('div');
 
diff --git a/packages/happy-dom/test/storage/Storage.test.ts b/packages/happy-dom/test/storage/Storage.test.ts
index f09692fc..679d60a1 100644
--- a/packages/happy-dom/test/storage/Storage.test.ts
+++ b/packages/happy-dom/test/storage/Storage.test.ts
@@ -8,7 +8,7 @@ describe('Storage', () => {
 	});
 
 	describe('get length()', () => {
-		test('Returns length.', () => {
+		it('Returns length.', () => {
 			storage.setItem('key1', 'value1');
 			storage.setItem('key2', 'value2');
 			expect(storage.length).toBe(2);
@@ -18,7 +18,7 @@ describe('Storage', () => {
 	});
 
 	describe('key()', () => {
-		test('Returns name of the nth name.', () => {
+		it('Returns name of the nth name.', () => {
 			storage.setItem('key1', 'value1');
 			storage.setItem('key2', 'value2');
 			expect(storage.key(0)).toBe('key1');
@@ -28,7 +28,7 @@ describe('Storage', () => {
 	});
 
 	describe('getItem()', () => {
-		test('Returns item.', () => {
+		it('Returns item.', () => {
 			storage.setItem('key1', 'value1');
 			storage.setItem('key2', 'value2');
 			expect(storage.getItem('key1')).toBe('value1');
@@ -37,7 +37,7 @@ describe('Storage', () => {
 	});
 
 	describe('setItem()', () => {
-		test('Returns item.', () => {
+		it('Returns item.', () => {
 			storage.setItem('key1', 'value1');
 			storage.setItem('key2', 'value2');
 			expect(storage.getItem('key1')).toBe('value1');
@@ -46,7 +46,7 @@ describe('Storage', () => {
 	});
 
 	describe('removeItem()', () => {
-		test('Removes an item.', () => {
+		it('Removes an item.', () => {
 			storage.setItem('key1', 'value1');
 			storage.setItem('key2', 'value2');
 			storage.removeItem('key2');
diff --git a/packages/happy-dom/test/tree-walker/TreeWalker.test.ts b/packages/happy-dom/test/tree-walker/TreeWalker.test.ts
index a1880b14..fc4a6f56 100644
--- a/packages/happy-dom/test/tree-walker/TreeWalker.test.ts
+++ b/packages/happy-dom/test/tree-walker/TreeWalker.test.ts
@@ -16,7 +16,8 @@ const NODE_TO_STRING = (node: Node): string => {
 };
 
 describe('TreeWalker', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -25,7 +26,7 @@ describe('TreeWalker', () => {
 	});
 
 	describe('nextNode()', () => {
-		test('Walks into each node in the DOM tree.', () => {
+		it('Walks into each node in the DOM tree.', () => {
 			const treeWalker = document.createTreeWalker(document.body);
 			const html = [];
 			let currentNode;
@@ -62,7 +63,7 @@ describe('TreeWalker', () => {
 			]);
 		});
 
-		test('Walks into each HTMLElement in the DOM tree when whatToShow is set to NodeFilter.SHOW_ELEMENT.', () => {
+		it('Walks into each HTMLElement in the DOM tree when whatToShow is set to NodeFilter.SHOW_ELEMENT.', () => {
 			const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
 			const html = [];
 			let currentNode;
@@ -80,7 +81,7 @@ describe('TreeWalker', () => {
 			]);
 		});
 
-		test('Walks into each HTMLElement and Comment in the DOM tree when whatToShow is set to NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT.', () => {
+		it('Walks into each HTMLElement and Comment in the DOM tree when whatToShow is set to NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT.', () => {
 			const treeWalker = document.createTreeWalker(
 				document.body,
 				NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT
@@ -105,7 +106,7 @@ describe('TreeWalker', () => {
 			]);
 		});
 
-		test('Walks into each HTMLElement in the DOM tree when whatToShow is set to NodeFilter.SHOW_ALL and provided filter function returns NodeFilter.FILTER_SKIP if not an HTMLElement and NodeFilter.FILTER_ACCEPT if it is.', () => {
+		it('Walks into each HTMLElement in the DOM tree when whatToShow is set to NodeFilter.SHOW_ALL and provided filter function returns NodeFilter.FILTER_SKIP if not an HTMLElement and NodeFilter.FILTER_ACCEPT if it is.', () => {
 			const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ALL, {
 				acceptNode: (node: Node) =>
 					node.nodeType === Node.ELEMENT_NODE ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
@@ -126,7 +127,7 @@ describe('TreeWalker', () => {
 			]);
 		});
 
-		test('Rejects the two first nodes when provided filter function returns NodeFilter.FILTER_REJECT on the two first nodes.', () => {
+		it('Rejects the two first nodes when provided filter function returns NodeFilter.FILTER_REJECT on the two first nodes.', () => {
 			let rejected = 0;
 			const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ALL, {
 				acceptNode: () => {
@@ -161,7 +162,7 @@ describe('TreeWalker', () => {
 	});
 
 	describe('previousNode()', () => {
-		test('Returns the previous node when executed after a nextNode() call.', () => {
+		it('Returns the previous node when executed after a nextNode() call.', () => {
 			const treeWalker = document.createTreeWalker(document.body);
 			let expectedPreviousNode = null;
 			let previousNode = null;
@@ -179,7 +180,7 @@ describe('TreeWalker', () => {
 	});
 
 	describe('parentNode()', () => {
-		test('Returns the parent node.', () => {
+		it('Returns the parent node.', () => {
 			const treeWalker = document.createTreeWalker(document.body);
 			const node = treeWalker.nextNode();
 			expect(node.parentNode).not.toBe(null);
@@ -188,7 +189,7 @@ describe('TreeWalker', () => {
 	});
 
 	describe('firstChild()', () => {
-		test('Returns the first child node.', () => {
+		it('Returns the first child node.', () => {
 			const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
 			const node = treeWalker.nextNode();
 			expect(node.firstChild).not.toBe(null);
diff --git a/packages/happy-dom/test/window/Window.test.ts b/packages/happy-dom/test/window/Window.test.ts
index afd5b76c..2b9cb142 100644
--- a/packages/happy-dom/test/window/Window.test.ts
+++ b/packages/happy-dom/test/window/Window.test.ts
@@ -43,7 +43,7 @@ describe('Window', () => {
 	});
 
 	describe('getComputedStyle()', () => {
-		test('Returns a CSSStyleDeclaration object with computed styles that are live updated whenever the element styles are changed.', () => {
+		it('Returns a CSSStyleDeclaration object with computed styles that are live updated whenever the element styles are changed.', () => {
 			const element = <HTMLElement>window.document.createElement('div');
 			const computedStyle = window.getComputedStyle(element);
 
@@ -60,14 +60,14 @@ describe('Window', () => {
 	});
 
 	describe('setTimeout()', () => {
-		test('Sets a timeout.', done => {
+		it('Sets a timeout.', done => {
 			const timeoutId = window.setTimeout(() => done());
 			expect(timeoutId.constructor.name).toBe('Timeout');
 		});
 	});
 
 	describe('clearTimeout()', () => {
-		test('Clears a timeout.', () => {
+		it('Clears a timeout.', () => {
 			const timeoutId = window.setTimeout(() => {
 				throw new Error('This timeout should have been canceled.');
 			});
@@ -76,7 +76,7 @@ describe('Window', () => {
 	});
 
 	describe('setInterval()', () => {
-		test('Sets an interval.', done => {
+		it('Sets an interval.', done => {
 			let count = 0;
 			const intervalId = window.setInterval(() => {
 				count++;
@@ -89,7 +89,7 @@ describe('Window', () => {
 	});
 
 	describe('clearInterval()', () => {
-		test('Clears an interval.', () => {
+		it('Clears an interval.', () => {
 			const intervalId = window.setInterval(() => {
 				throw new Error('This interval should have been canceled.');
 			});
@@ -98,14 +98,14 @@ describe('Window', () => {
 	});
 
 	describe('requestAnimationFrame()', () => {
-		test('Requests an animation frame.', done => {
+		it('Requests an animation frame.', done => {
 			const timeoutId = window.requestAnimationFrame(() => done());
 			expect(timeoutId.constructor.name).toBe('Timeout');
 		});
 	});
 
 	describe('cancelAnimationFrame()', () => {
-		test('Cancels an animation frame.', () => {
+		it('Cancels an animation frame.', () => {
 			const timeoutId = window.requestAnimationFrame(() => {
 				throw new Error('This timeout should have been canceled.');
 			});
@@ -114,7 +114,7 @@ describe('Window', () => {
 	});
 
 	describe('fetch()', () => {
-		test('Handles successful JSON request.', async () => {
+		it('Handles successful JSON request.', async () => {
 			const expectedUrl = 'https://localhost:8080/path/';
 			const expectedOptions = {};
 
@@ -128,7 +128,7 @@ describe('Window', () => {
 			expect(jsonResponse).toEqual({});
 		});
 
-		test('Handles successful Text request.', async () => {
+		it('Handles successful Text request.', async () => {
 			const expectedUrl = 'https://localhost:8080/path/';
 			const expectedOptions = {};
 
@@ -142,7 +142,7 @@ describe('Window', () => {
 			expect(textResponse).toEqual(fetchResponseBody);
 		});
 
-		test('Handles relative URL.', async () => {
+		it('Handles relative URL.', async () => {
 			const expectedPath = '/path/';
 			const expectedOptions = {};
 
@@ -158,7 +158,7 @@ describe('Window', () => {
 			expect(textResponse).toEqual(fetchResponseBody);
 		});
 
-		test('Handles error JSON request.', async () => {
+		it('Handles error JSON request.', async () => {
 			fetchError = new Error('error');
 
 			try {
@@ -170,7 +170,7 @@ describe('Window', () => {
 	});
 
 	describe('happyDOM.whenAsyncComplete()', () => {
-		test('Resolves the Promise returned by whenAsyncComplete() when all async tasks has been completed.', async () => {
+		it('Resolves the Promise returned by whenAsyncComplete() when all async tasks has been completed.', async () => {
 			let isFirstWhenAsyncCompleteCalled = false;
 			window.happyDOM.whenAsyncComplete().then(() => {
 				isFirstWhenAsyncCompleteCalled = true;
@@ -209,7 +209,7 @@ describe('Window', () => {
 	});
 
 	describe('happyDOM.cancelAsync()', () => {
-		test('Cancels all ongoing asynchrounous tasks.', done => {
+		it('Cancels all ongoing asynchrounous tasks.', done => {
 			let isFirstWhenAsyncCompleteCalled = false;
 			window.happyDOM.whenAsyncComplete().then(() => {
 				isFirstWhenAsyncCompleteCalled = true;
@@ -275,31 +275,31 @@ describe('Window', () => {
 
 	for (const functionName of ['scroll', 'scrollTo']) {
 		describe(`${functionName}()`, () => {
-			test('Sets the properties scrollTop and scrollLeft.', () => {
+			it('Sets the properties scrollTop and scrollLeft.', () => {
 				window[functionName](50, 60);
 				expect(window.document.documentElement.scrollLeft).toBe(50);
 				expect(window.document.documentElement.scrollTop).toBe(60);
 			});
 
-			test('Sets the properties scrollTop and scrollLeft using object.', () => {
+			it('Sets the properties scrollTop and scrollLeft using object.', () => {
 				window[functionName]({ left: 50, top: 60 });
 				expect(window.document.documentElement.scrollLeft).toBe(50);
 				expect(window.document.documentElement.scrollTop).toBe(60);
 			});
 
-			test('Sets only the property scrollTop.', () => {
+			it('Sets only the property scrollTop.', () => {
 				window[functionName]({ top: 60 });
 				expect(window.document.documentElement.scrollLeft).toBe(0);
 				expect(window.document.documentElement.scrollTop).toBe(60);
 			});
 
-			test('Sets only the property scrollLeft.', () => {
+			it('Sets only the property scrollLeft.', () => {
 				window[functionName]({ left: 60 });
 				expect(window.document.documentElement.scrollLeft).toBe(60);
 				expect(window.document.documentElement.scrollTop).toBe(0);
 			});
 
-			test('Sets the properties scrollTop and scrollLeft with animation.', async () => {
+			it('Sets the properties scrollTop and scrollLeft with animation.', async () => {
 				window[functionName]({ left: 50, top: 60, behavior: 'smooth' });
 				expect(window.document.documentElement.scrollLeft).toBe(0);
 				expect(window.document.documentElement.scrollTop).toBe(0);
@@ -311,7 +311,7 @@ describe('Window', () => {
 	}
 
 	describe('addEventListener()', () => {
-		test('Triggers "load" event if no resources needs to be loaded.', done => {
+		it('Triggers "load" event if no resources needs to be loaded.', done => {
 			let loadEvent = null;
 
 			window.addEventListener('load', event => {
@@ -324,7 +324,7 @@ describe('Window', () => {
 			}, 1);
 		});
 
-		test('Triggers "load" event when all resources have been loaded.', done => {
+		it('Triggers "load" event when all resources have been loaded.', done => {
 			const cssURL = '/path/to/file.css';
 			const jsURL = '/path/to/file.js';
 			const cssResponse = 'body { background-color: red; }';
@@ -375,7 +375,7 @@ describe('Window', () => {
 			}, 0);
 		});
 
-		test('Triggers "error" event if there are problems loading resources.', done => {
+		it('Triggers "error" event if there are problems loading resources.', done => {
 			const cssURL = '/path/to/file.css';
 			const jsURL = '/path/to/file.js';
 			const errorEvents = [];
diff --git a/packages/happy-dom/test/xml-parser/XMLParser.test.ts b/packages/happy-dom/test/xml-parser/XMLParser.test.ts
index 29fb7350..7d8eb661 100644
--- a/packages/happy-dom/test/xml-parser/XMLParser.test.ts
+++ b/packages/happy-dom/test/xml-parser/XMLParser.test.ts
@@ -1,5 +1,6 @@
 import XMLParser from '../../src/xml-parser/XMLParser';
 import Window from '../../src/window/Window';
+import Document from '../../src/nodes/document/Document';
 import HTMLElement from '../../src/nodes/html-element/HTMLElement';
 import XMLParserHTML from './data/XMLParserHTML';
 import NamespaceURI from '../../src/config/NamespaceURI';
@@ -7,20 +8,22 @@ import DocumentType from '../../src/nodes/document-type/DocumentType';
 
 describe('XMLParser', () => {
 	let window: Window;
+	let document: Document;
 
 	beforeEach(() => {
 		window = new Window();
+		document = window.document;
 	});
 
 	describe('parse()', () => {
-		test('Parses HTML with a single <div>.', () => {
+		it('Parses HTML with a single <div>.', () => {
 			const root = XMLParser.parse(window.document, '<div></div>');
 			expect(root.childNodes.length).toBe(1);
 			expect(root.childNodes[0].childNodes.length).toBe(0);
 			expect((<HTMLElement>root.childNodes[0]).tagName).toBe('DIV');
 		});
 
-		test('Parses HTML with a single <div> with attributes.', () => {
+		it('Parses HTML with a single <div> with attributes.', () => {
 			const root = XMLParser.parse(
 				window.document,
 				'<div class="class1 class2" id="id" data-no-value></div>'
@@ -31,22 +34,64 @@ describe('XMLParser', () => {
 			expect((<HTMLElement>root.childNodes[0]).id).toBe('id');
 			expect((<HTMLElement>root.childNodes[0]).className).toBe('class1 class2');
 			expect((<HTMLElement>root.childNodes[0]).attributes).toEqual({
-				'0': { name: 'class', value: 'class1 class2', namespaceURI: null },
-				'1': { name: 'id', value: 'id', namespaceURI: null },
-				'2': { name: 'data-no-value', value: '', namespaceURI: null },
-				class: { name: 'class', value: 'class1 class2', namespaceURI: null },
-				id: { name: 'id', value: 'id', namespaceURI: null },
-				'data-no-value': { name: 'data-no-value', value: '', namespaceURI: null },
+				'0': {
+					name: 'class',
+					value: 'class1 class2',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
+				'1': {
+					name: 'id',
+					value: 'id',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
+				'2': {
+					name: 'data-no-value',
+					value: '',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
+				class: {
+					name: 'class',
+					value: 'class1 class2',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
+				id: {
+					name: 'id',
+					value: 'id',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
+				'data-no-value': {
+					name: 'data-no-value',
+					value: '',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: root.childNodes[0],
+					ownerDocument: document
+				},
 				length: 3
 			});
 		});
 
-		test('Parses an entire HTML page.', () => {
+		it('Parses an entire HTML page.', () => {
 			const root = XMLParser.parse(window.document, XMLParserHTML);
 			expect(root.innerHTML.replace(/[\s]/gm, '')).toBe(XMLParserHTML.replace(/[\s]/gm, ''));
 		});
 
-		test('Parses a page with document type set to "HTML 4.01".', () => {
+		it('Parses a page with document type set to "HTML 4.01".', () => {
 			const pageHTML = XMLParserHTML.trim().replace(
 				'<!DOCTYPE html>',
 				'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'
@@ -59,7 +104,7 @@ describe('XMLParser', () => {
 			expect(root.innerHTML.replace(/[\s]/gm, '')).toBe(pageHTML.replace(/[\s]/gm, ''));
 		});
 
-		test('Parses a page with document type set to "MathML 1.01".', () => {
+		it('Parses a page with document type set to "MathML 1.01".', () => {
 			const pageHTML = XMLParserHTML.trim().replace(
 				'<!DOCTYPE html>',
 				'<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">'
@@ -72,7 +117,7 @@ describe('XMLParser', () => {
 			expect(root.innerHTML.replace(/[\s]/gm, '')).toBe(pageHTML.replace(/[\s]/gm, ''));
 		});
 
-		test('Handles unclosed tags of unnestable elements (e.g. <a>, <li>).', () => {
+		it('Handles unclosed tags of unnestable elements (e.g. <a>, <li>).', () => {
 			const root = XMLParser.parse(
 				window.document,
 				`
@@ -101,7 +146,7 @@ describe('XMLParser', () => {
 			);
 		});
 
-		test('Parses an SVG with "xmlns" set to HTML.', () => {
+		it('Parses an SVG with "xmlns" set to HTML.', () => {
 			const root = XMLParser.parse(
 				window.document,
 				`
@@ -128,14 +173,70 @@ describe('XMLParser', () => {
 
 			// Attributes should be in lower-case now as the namespace is HTML
 			expect(svg.attributes).toEqual({
-				'0': { name: 'viewbox', value: '0 0 300 100', namespaceURI: null },
-				'1': { name: 'stroke', value: 'red', namespaceURI: null },
-				'2': { name: 'fill', value: 'grey', namespaceURI: null },
-				'3': { name: 'xmlns', value: NamespaceURI.html, namespaceURI: null },
-				viewbox: { name: 'viewbox', value: '0 0 300 100', namespaceURI: null },
-				stroke: { name: 'stroke', value: 'red', namespaceURI: null },
-				fill: { name: 'fill', value: 'grey', namespaceURI: null },
-				xmlns: { name: 'xmlns', value: NamespaceURI.html, namespaceURI: null },
+				'0': {
+					name: 'viewbox',
+					value: '0 0 300 100',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				'1': {
+					name: 'stroke',
+					value: 'red',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				'2': {
+					name: 'fill',
+					value: 'grey',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				'3': {
+					name: 'xmlns',
+					value: NamespaceURI.html,
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				viewbox: {
+					name: 'viewbox',
+					value: '0 0 300 100',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				stroke: {
+					name: 'stroke',
+					value: 'red',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				fill: {
+					name: 'fill',
+					value: 'grey',
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
+				xmlns: {
+					name: 'xmlns',
+					value: NamespaceURI.html,
+					namespaceURI: null,
+					specified: true,
+					ownerElement: svg,
+					ownerDocument: document
+				},
 				length: 4
 			});
 
diff --git a/packages/happy-dom/test/xml-serializer/XMLSerializer.test.ts b/packages/happy-dom/test/xml-serializer/XMLSerializer.test.ts
index 2006feee..c4f37cf0 100644
--- a/packages/happy-dom/test/xml-serializer/XMLSerializer.test.ts
+++ b/packages/happy-dom/test/xml-serializer/XMLSerializer.test.ts
@@ -14,7 +14,7 @@ describe('XMLSerializer', () => {
 	});
 
 	describe('serializeToString()', () => {
-		test('Serializes a <div> element.', () => {
+		it('Serializes a <div> element.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -32,7 +32,7 @@ describe('XMLSerializer', () => {
 			);
 		});
 
-		test('Serializes a comment node.', () => {
+		it('Serializes a comment node.', () => {
 			const div = document.createElement('div');
 			const comment = document.createComment('');
 
@@ -43,7 +43,7 @@ describe('XMLSerializer', () => {
 			expect(xmlSerializer.serializeToString(div)).toBe('<div><!--Some comment.--></div>');
 		});
 
-		test('Serializes a text nodes.', () => {
+		it('Serializes a text nodes.', () => {
 			const div = document.createElement('div');
 			const text1 = document.createTextNode('Text 1.');
 			const text2 = document.createTextNode('Text 2.');
@@ -54,7 +54,7 @@ describe('XMLSerializer', () => {
 			expect(xmlSerializer.serializeToString(div)).toBe('<div>Text 1.Text 2.</div>');
 		});
 
-		test('Serializes a mix of nodes.', () => {
+		it('Serializes a mix of nodes.', () => {
 			const div = document.createElement('div');
 			const comment1 = document.createComment('Comment 1.');
 			const comment2 = document.createComment('Comment 2.');
@@ -83,7 +83,7 @@ describe('XMLSerializer', () => {
 			);
 		});
 
-		test('Serializes a closed custom element.', () => {
+		it('Serializes a closed custom element.', () => {
 			const div = document.createElement('div');
 			const customElement = document.createElement('custom-element');
 
diff --git a/packages/jest-environment/test/angular/Angular.test.ts b/packages/jest-environment/test/angular/Angular.test.ts
index ddc9f36c..6938ff1e 100644
--- a/packages/jest-environment/test/angular/Angular.test.ts
+++ b/packages/jest-environment/test/angular/Angular.test.ts
@@ -15,7 +15,7 @@ describe('React', () => {
 		document.body.removeChild(appElement);
 	});
 
-	test('Tests integration with Angular.', async () => {
+	it('Tests integration with Angular.', async () => {
 		enableProdMode();
 		await platformBrowserDynamic().bootstrapModule(AngularModule);
 		expect(appElement.innerHTML).toBe('<div>Test</div>');
diff --git a/packages/jest-environment/test/angular/AngularComponent.ts b/packages/jest-environment/test/angular/AngularComponent.ts
index 604b1072..3c95cb2c 100644
--- a/packages/jest-environment/test/angular/AngularComponent.ts
+++ b/packages/jest-environment/test/angular/AngularComponent.ts
@@ -1,4 +1,7 @@
 import { Component } from '@angular/core';
+/**
+ *
+ */
 @Component({
 	selector: 'app',
 	template: `
diff --git a/packages/jest-environment/test/angular/AngularModule.ts b/packages/jest-environment/test/angular/AngularModule.ts
index 4e4f46c5..8a07db95 100644
--- a/packages/jest-environment/test/angular/AngularModule.ts
+++ b/packages/jest-environment/test/angular/AngularModule.ts
@@ -2,6 +2,9 @@ import { NgModule } from '@angular/core';
 import { BrowserModule } from '@angular/platform-browser';
 import AngularComponent from './AngularComponent';
 
+/**
+ *
+ */
 @NgModule({
 	imports: [BrowserModule],
 	declarations: [AngularComponent],
diff --git a/packages/jest-environment/test/jquery/JQuery.test.ts b/packages/jest-environment/test/jquery/JQuery.test.ts
index 8466e916..6bc1b1ba 100644
--- a/packages/jest-environment/test/jquery/JQuery.test.ts
+++ b/packages/jest-environment/test/jquery/JQuery.test.ts
@@ -21,7 +21,7 @@ describe('JQuery', () => {
 		document.body.innerHTML = '';
 	});
 
-	test('Tests integration.', () => {
+	it('Tests integration.', () => {
 		JQuery('span').addClass('test-span');
 		expect(document.body.children[0].children[1].getAttribute('class')).toBe('test-span');
 	});
diff --git a/packages/jest-environment/test/lit-element/LitElement.test.ts b/packages/jest-environment/test/lit-element/LitElement.test.ts
index 322991de..bc04ec32 100644
--- a/packages/jest-environment/test/lit-element/LitElement.test.ts
+++ b/packages/jest-environment/test/lit-element/LitElement.test.ts
@@ -11,7 +11,7 @@ describe('LitElementComponent', () => {
 		document.body.innerHTML = '';
 	});
 
-	test('Tests integration.', () => {
+	it('Tests integration.', () => {
 		const shadowRoot = document.body.querySelector('lit-element-component').shadowRoot;
 
 		expect(document.body.innerHTML).toBe(
diff --git a/packages/jest-environment/test/lit-element/LitElementComponent.ts b/packages/jest-environment/test/lit-element/LitElementComponent.ts
index 4124cfd5..d8da3be6 100644
--- a/packages/jest-environment/test/lit-element/LitElementComponent.ts
+++ b/packages/jest-environment/test/lit-element/LitElementComponent.ts
@@ -7,6 +7,9 @@ import {
 	property
 } from '../../lib/node_modules/lit-element/lit-element';
 
+/**
+ *
+ */
 @customElement('lit-element-component')
 export class LitElementComponent extends LitElement {
 	public static styles = css`
diff --git a/packages/jest-environment/test/react/React.test.tsx b/packages/jest-environment/test/react/React.test.tsx
index 3f193975..513cc89d 100644
--- a/packages/jest-environment/test/react/React.test.tsx
+++ b/packages/jest-environment/test/react/React.test.tsx
@@ -14,12 +14,12 @@ describe('React', () => {
 		document.body.removeChild(appElement);
 	});
 
-	test('Tests integration.', () => {
+	it('Tests integration.', () => {
 		ReactDOM.render(<ReactComponent />, appElement);
 		expect(appElement.innerHTML).toBe('<div>Test</div>');
 	});
 
-	test('Can unmount a component.', () => {
+	it('Can unmount a component.', () => {
 		ReactDOM.render(<ReactComponent />, appElement);
 		ReactDOM.unmountComponentAtNode(appElement);
 		expect(appElement.innerHTML).toBe('');
diff --git a/packages/jest-environment/test/react/ReactComponent.tsx b/packages/jest-environment/test/react/ReactComponent.tsx
index a143a841..af2218fa 100644
--- a/packages/jest-environment/test/react/ReactComponent.tsx
+++ b/packages/jest-environment/test/react/ReactComponent.tsx
@@ -1,5 +1,8 @@
 import React from 'react';
 
+/**
+ *
+ */
 export default class ReactComponent extends React.Component<{}, void> {
 	/**
 	 * @override
diff --git a/packages/jest-environment/test/vue/Vue.test.ts b/packages/jest-environment/test/vue/Vue.test.ts
index ea2ade9e..ff15618c 100644
--- a/packages/jest-environment/test/vue/Vue.test.ts
+++ b/packages/jest-environment/test/vue/Vue.test.ts
@@ -14,7 +14,7 @@ describe('Vue', () => {
 		document.body.innerHTML = '';
 	});
 
-	test('Tests integration.', () => {
+	it('Tests integration.', () => {
 		new Vue({
 			el: '#app',
 			data: {
diff --git a/packages/server-rendering/test/context/HappyDOMContext.test.ts b/packages/server-rendering/test/context/HappyDOMContext.test.ts
index 3ae41e16..b4df6be4 100644
--- a/packages/server-rendering/test/context/HappyDOMContext.test.ts
+++ b/packages/server-rendering/test/context/HappyDOMContext.test.ts
@@ -14,7 +14,7 @@ describe('HappyDOMContext', () => {
 	});
 
 	describe('render()', () => {
-		test('Renders a page without opening shadow roots.', async () => {
+		it('Renders a page without opening shadow roots.', async () => {
 			const script = new VM.Script(SCRIPT);
 			const result = await context.render({
 				html: HappyDOMContextHTML,
@@ -41,7 +41,7 @@ describe('HappyDOMContext', () => {
 			);
 		});
 
-		test('Renders a page with opened shadow roots, scoped CSS and CSS added to document head.', async () => {
+		it('Renders a page with opened shadow roots, scoped CSS and CSS added to document head.', async () => {
 			const script1 = new VM.Script(SCRIPT);
 			const script2 = new VM.Script(`
 				setTimeout(() => {
diff --git a/packages/server-rendering/test/renderer/HappyDOMServerRenderer.test.ts b/packages/server-rendering/test/renderer/HappyDOMServerRenderer.test.ts
index 6e20aa9c..adc6364e 100644
--- a/packages/server-rendering/test/renderer/HappyDOMServerRenderer.test.ts
+++ b/packages/server-rendering/test/renderer/HappyDOMServerRenderer.test.ts
@@ -3,7 +3,8 @@ import HappyDOMServerRendererHTMLElement from './mock-data/HappyDOMServerRendere
 import { Window } from 'happy-dom';
 
 describe('HappyDOMServerRenderer', () => {
-	let window, document;
+	let window;
+	let document;
 
 	beforeEach(() => {
 		window = new Window();
@@ -12,7 +13,7 @@ describe('HappyDOMServerRenderer', () => {
 	});
 
 	describe('render()', () => {
-		test('Renders a <div> element.', () => {
+		it('Renders a <div> element.', () => {
 			const div = document.createElement('div');
 			const span = document.createElement('span');
 
@@ -30,7 +31,7 @@ describe('HappyDOMServerRenderer', () => {
 			);
 		});
 
-		test('Renders a comment node.', () => {
+		it('Renders a comment node.', () => {
 			const div = document.createElement('div');
 			const comment = document.createComment();
 
@@ -41,7 +42,7 @@ describe('HappyDOMServerRenderer', () => {
 			expect(new HappyDOMServerRenderer().render(div).html).toBe('<div><!--Some comment.--></div>');
 		});
 
-		test('Renders a text nodes.', () => {
+		it('Renders a text nodes.', () => {
 			const div = document.createElement('div');
 			const text1 = document.createTextNode('Text 1.');
 			const text2 = document.createTextNode('Text 2.');
@@ -52,7 +53,7 @@ describe('HappyDOMServerRenderer', () => {
 			expect(new HappyDOMServerRenderer().render(div).html).toBe('<div>Text 1.Text 2.</div>');
 		});
 
-		test('Renders a mix of nodes.', () => {
+		it('Renders a mix of nodes.', () => {
 			const div = document.createElement('div');
 			const comment1 = document.createComment('Comment 1.');
 			const comment2 = document.createComment('Comment 2.');
@@ -81,7 +82,7 @@ describe('HappyDOMServerRenderer', () => {
 			);
 		});
 
-		test('Renders a custom element closed.', () => {
+		it('Renders a custom element closed.', () => {
 			const div = document.createElement('div');
 			const customElement = document.createElement('mocked-html-element');
 
@@ -99,7 +100,7 @@ describe('HappyDOMServerRenderer', () => {
 			);
 		});
 
-		test('Renders a custom element opened.', () => {
+		it('Renders a custom element opened.', () => {
 			const div = document.createElement('div');
 			const customElement = document.createElement('mocked-html-element');
 
@@ -159,7 +160,7 @@ describe('HappyDOMServerRenderer', () => {
 			expect(result.css).toEqual([]);
 		});
 
-		test('Renders a custom element opened with scoped CSS.', () => {
+		it('Renders a custom element opened with scoped CSS.', () => {
 			const div = document.createElement('div');
 			const customElement = document.createElement('mocked-html-element');
 
@@ -221,7 +222,7 @@ describe('HappyDOMServerRenderer', () => {
 			]);
 		});
 
-		test('Renders a custom element opened with scoped & extracted CSS.', () => {
+		it('Renders a custom element opened with scoped & extracted CSS.', () => {
 			const div = document.createElement('div');
 			const customElement = document.createElement('mocked-html-element');
 
diff --git a/packages/server-rendering/test/renderer/mock-data/HappyDOMServerRendererHTMLElement.ts b/packages/server-rendering/test/renderer/mock-data/HappyDOMServerRendererHTMLElement.ts
index b04203c9..6c436a92 100644
--- a/packages/server-rendering/test/renderer/mock-data/HappyDOMServerRendererHTMLElement.ts
+++ b/packages/server-rendering/test/renderer/mock-data/HappyDOMServerRendererHTMLElement.ts
@@ -3,7 +3,7 @@ import { HTMLElement } from 'happy-dom';
 /**
  * CustomElement test class.
  */
-export default class CustomElement extends HTMLElement {
+export default class HappyDOMServerRendererHTMLElement extends HTMLElement {
 	public changedAttributes = [];
 
 	/**