Skip to content

Expect holds reference to value, generates error string at the end of test (after mutation) #429

@jimfb

Description

@jimfb
var foo = [1];
expect(foo).toEqual([1, 2]);
foo.length = 0;

expect should print the expected value as [1] but prints as [].

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