fix: Prevent mocha tests failures when window does not have focus. (#9332)

* chore: Add puppeteer-core as a dev dependency.

* fix: Make mocha tests run in a fake-focused window.

* fix: Make `test:mocha:interactive` use the same gulp codepath as `test`.
This commit is contained in:
Aaron Dodson
2025-08-27 12:28:06 -07:00
parent f10454cb36
commit b0569c4a57
5 changed files with 111 additions and 18 deletions

View File

@@ -45,7 +45,7 @@
"test": "gulp test",
"test:browser": "cd tests/browser && npx mocha",
"test:generators": "gulp testGenerators",
"test:mocha:interactive": "npm run build && concurrently -n tsc,server \"tsc --watch --preserveWatchOutput --outDir \"build/src\" --declarationDir \"build/declarations\"\" \"http-server ./ -o /tests/mocha/index.html -c-1\"",
"test:mocha:interactive": "npm run build && concurrently -n tsc,server \"tsc --watch --preserveWatchOutput --outDir \"build/src\" --declarationDir \"build/declarations\"\" \"gulp interactiveMocha\"",
"test:compile:advanced": "gulp buildAdvancedCompilationTest --debug",
"updateGithubPages": "npm ci && gulp gitUpdateGithubPages"
},
@@ -138,6 +138,7 @@
"patch-package": "^8.0.0",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.0.0",
"puppeteer-core": "^24.17.0",
"readline-sync": "^1.4.10",
"rimraf": "^5.0.0",
"typescript": "^5.3.3",