test: add mock DOM to test environment

This commit is contained in:
xenticore
2025-03-27 12:11:20 -04:00
parent 349ceacb4d
commit 15841520fd
4 changed files with 6 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

2
bunfig.toml Normal file
View File

@@ -0,0 +1,2 @@
[test]
preload = "./happydom.ts"

3
happydom.ts Normal file
View File

@@ -0,0 +1,3 @@
import { GlobalRegistrator } from "@happy-dom/global-registrator";
GlobalRegistrator.register();

View File

@@ -3,6 +3,7 @@
"version": "0.3.0", "version": "0.3.0",
"description": "Adds item pricing to the Team Fortress 2 wiki", "description": "Adds item pricing to the Team Fortress 2 wiki",
"devDependencies": { "devDependencies": {
"@happy-dom/global-registrator": "^17.4.4",
"@types/firefox-webext-browser": "^120.0.4", "@types/firefox-webext-browser": "^120.0.4",
"@types/greasemonkey": "^4.0.7", "@types/greasemonkey": "^4.0.7",
"@types/html": "^1.0.4", "@types/html": "^1.0.4",