Next.js - Error: only absolute urls are supported

后端 未结 6 1184
感动是毒
感动是毒 2020-12-29 10:05

I\'m using express as my custom server for next.js. Everything is fine, when I click the products to the list of products

Step 1: I click the produc

6条回答
  •  太阳男子
    2020-12-29 10:16

    use .log(console.log) after nock , so you will get exact unmatched and expected url . Example:

         nock("http://localhost")
    .log(console.log)
    .persist()
    .get("/api/config")
    .reply(200, { data: 1234 })
    

提交回复
热议问题