2017-02-16 14:25:17 +01:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>VSCode Tests</title>
|
2020-02-07 09:51:24 +01:00
|
|
|
<link href="../../../node_modules/mocha/mocha.css" rel="stylesheet" />
|
2017-02-16 14:25:17 +01:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="mocha"></div>
|
2020-02-07 09:51:24 +01:00
|
|
|
<script src="../../../node_modules/mocha/mocha.js"></script>
|
2017-04-28 11:42:06 +02:00
|
|
|
|
2017-02-16 14:25:17 +01:00
|
|
|
<script>
|
2019-08-21 15:20:49 +02:00
|
|
|
|
|
|
|
// !!! DO NOT CHANGE !!!
|
|
|
|
// Our unit tests may run in environments without
|
|
|
|
// display (e.g. from builds) and tests may by
|
|
|
|
// accident bring up native dialogs or even open
|
|
|
|
// windows. This we cannot allow as it may crash
|
|
|
|
// the test run.
|
|
|
|
// !!! DO NOT CHANGE !!!
|
2019-09-02 09:42:37 +02:00
|
|
|
window.open = function () { throw new Error('window.open() is not supported in tests!'); };
|
|
|
|
window.alert = function () { throw new Error('window.alert() is not supported in tests!'); }
|
|
|
|
window.confirm = function () { throw new Error('window.confirm() is not supported in tests!'); }
|
2019-08-21 15:20:49 +02:00
|
|
|
|
2019-11-13 10:39:47 +01:00
|
|
|
// Ignore uncaught cancelled promise errors
|
|
|
|
window.addEventListener('unhandledrejection', e => {
|
|
|
|
const name = e && e.reason && e.reason.name;
|
|
|
|
|
|
|
|
if (name === 'Canceled') {
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-03-09 11:03:07 +01:00
|
|
|
mocha.setup({
|
|
|
|
ui: 'tdd',
|
2021-01-08 09:09:19 +01:00
|
|
|
timeout: 5000,
|
|
|
|
forbidOnly: typeof process.env['BUILD_ARTIFACTSTAGINGDIRECTORY'] === 'string' // disallow .only() when running on build machine
|
2018-03-09 11:03:07 +01:00
|
|
|
});
|
2019-07-26 05:42:36 +02:00
|
|
|
require('./renderer');
|
2017-02-16 14:25:17 +01:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
2019-07-26 04:11:33 +02:00
|
|
|
</html>
|