test: enable nock as needed

This commit is contained in:
Girish Ramakrishnan
2025-02-06 15:01:59 +01:00
parent f64297c256
commit c6e93b9870
4 changed files with 21 additions and 6 deletions

View File

@@ -212,7 +212,6 @@ function createTree(root, obj) {
}
async function databaseSetup() {
if (nock.isActive()) nock.restore();
nock.cleanAll();
await database.initialize();
@@ -222,7 +221,6 @@ async function databaseSetup() {
}
async function domainSetup() {
if (nock.isActive()) nock.restore();
nock.cleanAll();
await databaseSetup();
@@ -244,7 +242,6 @@ async function setup() {
}
async function cleanup() {
if (nock.isActive()) nock.restore();
nock.cleanAll();
mailer._mailQueue = [];