summaryrefslogtreecommitdiff
path: root/tests/specs/task/dependencies/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/task/dependencies/util.js')
-rw-r--r--tests/specs/task/dependencies/util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/specs/task/dependencies/util.js b/tests/specs/task/dependencies/util.js
new file mode 100644
index 000000000..9579eb9c9
--- /dev/null
+++ b/tests/specs/task/dependencies/util.js
@@ -0,0 +1,4 @@
+export async function randomTimeout(min, max) {
+ const timeout = Math.floor(Math.random() * (max - min + 1) + min);
+ return new Promise((resolve) => setTimeout(resolve, timeout));
+}