update with tests

This commit is contained in:
Bryan MacFarlane
2019-09-21 08:56:30 -04:00
parent 6c7859e4c8
commit b2a87e0a71
10 changed files with 218 additions and 35 deletions

10
src/wait.ts Normal file
View File

@@ -0,0 +1,10 @@
export function wait(milliseconds) {
return new Promise((resolve, reject) => {
if (typeof(milliseconds) !== 'number') {
throw new Error('milleseconds not a number');
}
setTimeout(() => resolve("done!"), milliseconds)
});
}