tests: enable nock when needed

by default, it makes all requests disappear
This commit is contained in:
Girish Ramakrishnan
2025-02-05 18:19:00 +01:00
parent 7bcb6dd7cb
commit aa54e47029
6 changed files with 8 additions and 0 deletions
+1
View File
@@ -17,6 +17,7 @@ const { setup, cleanup, serverUrl, owner, appstoreToken } = common;
describe('Appstore Apps API', function () {
before(setup);
before(() => { if (!nock.isActive()) nock.activate(); });
after(cleanup);
it('cannot list apps when appstore is down', async function () {
+1
View File
@@ -16,6 +16,7 @@ describe('Support API', function () {
const { setup, cleanup, serverUrl, owner, mockApiServerOrigin, appstoreToken, user, admin } = common;
before(setup);
before(() => { if (!nock.isActive()) nock.activate(); });
after(cleanup);
const authorizedKeysFile = support._sshInfo().filePath;