2020-02-13 11:49:03 +01:00
|
|
|
function isTestInstance () {
|
|
|
|
return process.env.NODE_ENV === 'test'
|
|
|
|
}
|
|
|
|
|
2020-03-04 15:32:39 +01:00
|
|
|
function waitMs (ms: number) {
|
2020-12-29 16:04:27 +01:00
|
|
|
return new Promise<void>(res => {
|
2020-03-04 15:32:39 +01:00
|
|
|
setTimeout(() => res(), ms)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-02-13 11:49:03 +01:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
2020-03-04 15:32:39 +01:00
|
|
|
isTestInstance,
|
|
|
|
waitMs
|
2020-02-13 11:49:03 +01:00
|
|
|
}
|