From f5205c4b1bfb44327bf9f03f8cb37eaefff23c48 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 10 Oct 2023 10:20:13 +0800 Subject: [PATCH] fix tests --- packages/api/test/routers/article.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/api/test/routers/article.test.ts b/packages/api/test/routers/article.test.ts index e3b6638a0..1d0008602 100644 --- a/packages/api/test/routers/article.test.ts +++ b/packages/api/test/routers/article.test.ts @@ -16,7 +16,9 @@ describe('/article/save API', () => { // We need to mock the pupeeteer-parse // service here because in dev mode the task gets // called immediately. - nock(env.queue.contentFetchUrl).post('/').reply(200) + if (env.queue.contentFetchUrl) { + nock(env.queue.contentFetchUrl).post('/').reply(200) + } before(async () => { // create test user and login