8000 Avoid jest#13535 and planttheidea/fast-equals#91 · Issue #515 · cloudevents/sdk-javascript · GitHub
[go: up one dir, main page]

Skip to content
Avoid jest#13535 and planttheidea/fast-equals#91 #515
Closed
@PSanetra

Description

@PSanetra

Describe the Bug
CloudEvent class instances are at the moment not comparable using some popular libraries. Instances might be considered equal although they are not equal.

See the following issues:

Steps to Reproduce

  1. Create two CloudEvent instances with different data properties
  2. Pass the instances to expect(...).toStrictEqual(...) of jest and to circularDeepEqual(...) of the fast-equals library
  3. Both calls will consider those CloudEvent instances to be equal although they are not equal

Expected Behavior
Both instances should not be considered equal using those libraries.

How to fix
I think the best way to avoid this issue is to avoid using private javascript fields and use private Typescript fields instead.

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

      0