Skip to content

Commit

Permalink
Defines setInterval/setTimeout on faked globalThis in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
aiday-mar committed Sep 17, 2024
1 parent b31d22b commit b07209d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/smoke/webpack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 3 additions & 1 deletion test/unit/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ global.window = {
matches: false,
addEventListener: function () {}
};
}
},
setInterval: function () {},
setTimeout: function () {}
};

requirejs(
Expand Down

0 comments on commit b07209d

Please sign in to comment.