Skip to content

web.structured-clone test will always fail #1106

@Pyrolistical

Description

@Pyrolistical

if (!(test && test.a === test.b && test.a instanceof Error && test.stack === error.stack)) return false;

The bug in the test

var error = new Error();
var test = structuredClone({ a: error, b: error });
if (!(... && test.stack === error.stack)) return false;

test.stack will always be undefined and error.stack will always be an array.

I think the test intended use test.a.stack? But I am not sure as it would seem that test.a === error would be a better test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions