tests: enable nock when needed
by default, it makes all requests disappear
This commit is contained in:
@@ -212,6 +212,7 @@ function createTree(root, obj) {
|
||||
}
|
||||
|
||||
async function databaseSetup() {
|
||||
if (nock.isActive()) nock.restore();
|
||||
nock.cleanAll();
|
||||
|
||||
await database.initialize();
|
||||
@@ -221,6 +222,7 @@ async function databaseSetup() {
|
||||
}
|
||||
|
||||
async function domainSetup() {
|
||||
if (nock.isActive()) nock.restore();
|
||||
nock.cleanAll();
|
||||
|
||||
await databaseSetup();
|
||||
@@ -242,6 +244,7 @@ async function setup() {
|
||||
}
|
||||
|
||||
async function cleanup() {
|
||||
if (nock.isActive()) nock.restore();
|
||||
nock.cleanAll();
|
||||
mailer._mailQueue = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user