Selaa lähdekoodia

Defines setInterval/setTimeout on faked globalThis in unit test

Aiday Marlen Kyzy 7 kuukautta sitten
vanhempi
commit
b07209d651
4 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 7 7
      package-lock.json
  2. 1 1
      package.json
  3. 1 1
      test/smoke/webpack/index.html
  4. 3 1
      test/unit/all.js

+ 7 - 7
package-lock.json

@@ -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-rc",
 				"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-rc",
+			"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-rc.tgz",
+			"integrity": "sha512-HKSdq0yyKNiDVHyDWW5Y3B3jgnA4x0dPLHLbTtNxH4CD/m8d7YyTgBYDHlAs4G4m1AfeGGIGzCNgFqVZdWkFbQ==",
 			"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-rc",
+			"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-rc.tgz",
+			"integrity": "sha512-HKSdq0yyKNiDVHyDWW5Y3B3jgnA4x0dPLHLbTtNxH4CD/m8d7YyTgBYDHlAs4G4m1AfeGGIGzCNgFqVZdWkFbQ==",
 			"dev": true
 		},
 		"mri": {

+ 1 - 1
package.json

@@ -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-rc",
 		"parcel": "^2.7.0",
 		"pin-github-action": "^1.8.0",
 		"playwright": "^1.32.2",

+ 1 - 1
test/smoke/webpack/index.html

@@ -5,6 +5,6 @@
 	</head>
 	<body>
 		<div id="editor-container" style="position: absolute; width: 500px; height: 400px"></div>
-		<script type="text/javascript" src="out/app.js"></script>
+		<script type="text/javascript" src="./out/app.js"></script>
 	</body>
 </html>

+ 3 - 1
test/unit/all.js

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