mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
refactor: Move sleep function to seprate file
This commit is contained in:
7
test/helpers/sleep.js
Normal file
7
test/helpers/sleep.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export async function sleep (seconds) {
|
||||
let milliseconds = seconds * 1000;
|
||||
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, milliseconds);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user