Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

property '_httpMessage' closes the circle #509

Description

@wozjac

https://github.com/SAP-samples/cloud-cap-samples/blob/f3a8bd6a96ea1015e6c59b874e8da76dd77d7502/test/custom-handlers.test.js#L13

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions