Skip to content

[Bug]: unable to match URL query parameters with nodejs v19.8.1 #14012

@akornatskyy

Description

@akornatskyy

Version

29.5.0

Steps to reproduce

const x = jest.fn();

const url = new URL('http://localhost:8080/x');
url.searchParams.set('a', '1');

x(url);

expect(x).toBeCalledWith(new URL('http://localhost:8080/x?a=1'));

Expected behavior

it doesn't fail with nodejs 19.7.0

Actual behavior

    @@ -9,6 +9,13 @@
          "port": "8080",
          "protocol": "http:",
          "search": "?a=1",
          "username": "",
        },
    +   Symbol(query): URLSearchParams {
    +     Symbol(query): Array [
    +       "a",
    +       "1",
    +     ],
    +     Symbol(context): [Circular],
    +   },
      }

Additional context

No response

Environment

linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions