cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Test using cds.test() hits error @ node_modules/@sap/cds/lib/utils/axios.js:4:50

chongwahng
Explorer
0 Kudos
668

Hi CAP Community,

I am wondering if anyone has encountered error like the following when "axios" like call is involved in cds.test implementatoin.

It's just simple call retrieving $metadata like the following:

    it("serves custom endpoint", async () => {
        const {
            headers,
            status
        } = await GET("/user/$metadata", {});
        expect(status).to.equal(200);
    })
RegardsChong Wah

Accepted Solutions (1)

Accepted Solutions (1)

chgeo
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

the error is caused by the new version 1.0.0 of axios. We will provide a fix as part of this week's sap/cds release 6.2.1. So stay tuned or go back to an older axios version with `npm i axios@0.x`

We have also reported the issue against axios: https://github.com/axios/axios/issues/5017

Christian

Answers (0)