replace delay.js with timers/promises
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
const apps = require('../apps.js'),
|
||||
constants = require('../constants.js'),
|
||||
database = require('../database.js'),
|
||||
delay = require('../delay.js'),
|
||||
domains = require('../domains.js'),
|
||||
expect = require('expect.js'),
|
||||
fs = require('fs'),
|
||||
@@ -13,6 +12,7 @@ const apps = require('../apps.js'),
|
||||
paths = require('../paths.js'),
|
||||
settings = require('../settings.js'),
|
||||
tasks = require('../tasks.js'),
|
||||
timers = require('timers/promises'),
|
||||
users = require('../users.js');
|
||||
|
||||
const manifest = {
|
||||
@@ -45,30 +45,30 @@ const manifest = {
|
||||
|
||||
// copied from the proxy app CloudronManifest.json
|
||||
const proxyAppManifest = {
|
||||
"id": "io.cloudron.builtin.appproxy",
|
||||
"title": "App Proxy",
|
||||
"author": "Cloudron Team",
|
||||
"version": "1.0.0",
|
||||
"upstreamVersion": "1.0.0",
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"tagline": "Proxy an app through Cloudron",
|
||||
"tags": [ "proxy", "external" ],
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 3000,
|
||||
"minBoxVersion": "7.3.0",
|
||||
"dockerImage": "istobeignored",
|
||||
"manifestVersion": 2,
|
||||
"multiDomain": true,
|
||||
"website": "https://cloudron.io",
|
||||
"documentationUrl": "https://docs.cloudron.io/dashboard/#app-proxy",
|
||||
"forumUrl": "https://forum.cloudron.io",
|
||||
"contactEmail": "support@cloudron.io",
|
||||
"icon": "file://logo.png",
|
||||
"addons": {},
|
||||
"mediaLinks": [
|
||||
"https://screenshots.cloudron.io/io.cloudron.builtin.appproxy/diagram.png"
|
||||
],
|
||||
"changelog": "file://CHANGELOG.md"
|
||||
'id': 'io.cloudron.builtin.appproxy',
|
||||
'title': 'App Proxy',
|
||||
'author': 'Cloudron Team',
|
||||
'version': '1.0.0',
|
||||
'upstreamVersion': '1.0.0',
|
||||
'description': 'file://DESCRIPTION.md',
|
||||
'tagline': 'Proxy an app through Cloudron',
|
||||
'tags': [ 'proxy', 'external' ],
|
||||
'healthCheckPath': '/',
|
||||
'httpPort': 3000,
|
||||
'minBoxVersion': '7.3.0',
|
||||
'dockerImage': 'istobeignored',
|
||||
'manifestVersion': 2,
|
||||
'multiDomain': true,
|
||||
'website': 'https://cloudron.io',
|
||||
'documentationUrl': 'https://docs.cloudron.io/dashboard/#app-proxy',
|
||||
'forumUrl': 'https://forum.cloudron.io',
|
||||
'contactEmail': 'support@cloudron.io',
|
||||
'icon': 'file://logo.png',
|
||||
'addons': {},
|
||||
'mediaLinks': [
|
||||
'https://screenshots.cloudron.io/io.cloudron.builtin.appproxy/diagram.png'
|
||||
],
|
||||
'changelog': 'file://CHANGELOG.md'
|
||||
};
|
||||
|
||||
const domain = {
|
||||
@@ -249,7 +249,7 @@ function clearMailQueue() {
|
||||
}
|
||||
|
||||
async function checkMails(number) {
|
||||
await delay(1000);
|
||||
await timers.setTimeout(1000);
|
||||
expect(mailer._mailQueue.length).to.equal(number);
|
||||
const emails = mailer._mailQueue;
|
||||
clearMailQueue();
|
||||
|
||||
Reference in New Issue
Block a user