()
| 9 | const getKey = require("../dist-backend/key/get-key").default; |
| 10 | |
| 11 | const waitForDatabase = () => { |
| 12 | return new Promise((resolve, reject) => { |
| 13 | // Wait for the database to be ready. |
| 14 | const timeoutWait = () => { |
| 15 | setTimeout(() => resolve(), 3000); |
| 16 | }; |
| 17 | |
| 18 | if (conn.readyState !== 1) { |
| 19 | conn.once("open", () => { |
| 20 | timeoutWait(); |
| 21 | }); |
| 22 | } else { |
| 23 | timeoutWait(); |
| 24 | } |
| 25 | }); |
| 26 | }; |
| 27 | |
| 28 | // Wait to be after anything else may be printed to the terminal |
| 29 | const terminalWait = () => { |
no test coverage detected