Defines setInterval/setTimeout on faked globalThis in unit test

This commit is contained in:
Henning Dieterichs 2024-08-29 17:45:22 +02:00 committed by Henning Dieterichs
parent b31d22b9ee
commit f262e8f931
3 changed files with 11 additions and 9 deletions

14
package-lock.json generated
View File

@ -25,7 +25,7 @@
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.51.0-rc3",
"monaco-editor-core": "0.52.0-dev-20240826",
"parcel": "^2.7.0",
"pin-github-action": "^1.8.0",
"playwright": "^1.32.2",
@ -5394,9 +5394,9 @@
"dev": true
},
"node_modules/monaco-editor-core": {
"version": "0.51.0-rc3",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.51.0-rc3.tgz",
"integrity": "sha512-2CrhqO3ZdUXhMjNeq851FfulE04GBSn1/HBy02qnR4N4ONG5S8HuQKCkQxxzEeK3E8FGqDoIXH5nyDXpLmDJHg==",
"version": "0.52.0-dev-20240826",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-dev-20240826.tgz",
"integrity": "sha512-m5KQg1/SYSIWegxQlCloAeFcsfQUEeHlCGvj0+5wmYOFEruEOqf36f/wOlE9EoSXCTExM4gEOdBBZw/jZVKoIg==",
"dev": true
},
"node_modules/mri": {
@ -11150,9 +11150,9 @@
}
},
"monaco-editor-core": {
"version": "0.51.0-rc3",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.51.0-rc3.tgz",
"integrity": "sha512-2CrhqO3ZdUXhMjNeq851FfulE04GBSn1/HBy02qnR4N4ONG5S8HuQKCkQxxzEeK3E8FGqDoIXH5nyDXpLmDJHg==",
"version": "0.52.0-dev-20240826",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-dev-20240826.tgz",
"integrity": "sha512-m5KQg1/SYSIWegxQlCloAeFcsfQUEeHlCGvj0+5wmYOFEruEOqf36f/wOlE9EoSXCTExM4gEOdBBZw/jZVKoIg==",
"dev": true
},
"mri": {

View File

@ -52,7 +52,7 @@
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.51.0-rc3",
"monaco-editor-core": "0.52.0-dev-20240826",
"parcel": "^2.7.0",
"pin-github-action": "^1.8.0",
"playwright": "^1.32.2",

View File

@ -35,7 +35,9 @@ global.window = {
matches: false,
addEventListener: function () {}
};
}
},
setInterval: function () {},
setTimeout: function () {}
};
requirejs(