mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Flexible timeout for tests.
This commit is contained in:
parent
0cd17abafd
commit
b3cdeabf02
@ -4,10 +4,17 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>OpenSeadragon QUnit</title>
|
<title>OpenSeadragon QUnit</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function isInteractiveMode() {
|
||||||
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
||||||
|
const isHeadless = typeof navigator !== 'undefined' && navigator.webdriver;
|
||||||
|
return isBrowser && !isHeadless;
|
||||||
|
}
|
||||||
|
|
||||||
window.QUnit = {
|
window.QUnit = {
|
||||||
config: {
|
config: {
|
||||||
//one minute per test timeout
|
//five seconds timeout due to problems with untrusted events (e.g. auto zoom) for non-interactive runs
|
||||||
testTimeout: 5000
|
//there is timeWatcher property but sometimes tests do not respect it, or they get stuck due to bugs
|
||||||
|
testTimeout: isInteractiveMode() ? 30000 : 5000
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user