Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property '_httpMessage' closes the circle #509

Open
wozjac opened this issue May 22, 2023 · 0 comments
Open

property '_httpMessage' closes the circle #509

wozjac opened this issue May 22, 2023 · 0 comments

Comments

@wozjac
Copy link

wozjac commented May 22, 2023

await expect(POST `/browse/submitOrder ${{ book: 201, quantity: 5 }}`).to.be.rejectedWith(/409 - 5 exceeds stock for book #201/)

Hi, quick question - in case of GET,
when GET fails and it is expected in the test:

await expect(GET("/some-service/Entity", { params: { .... }})).to.be.rejectedWith(...)

then I have an error:

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'socket' -> object with constructor 'Object'
    --- property '_httpMessage' closes the circle
    at stringify (<anonymous>)
    at writeChannelMessage (node:internal/child_process/serialization:159:20)
    at process.target._send (node:internal/child_process:838:17)
    at process.target.send (node:internal/child_process:738:19)
    at reportSuccess (C:\workspace\dev\project1\node_modules\jest-worker\build\workers\processChild.js:82:11)

Is it possible to use this approach in such case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant