You can use one of the helper functions in expect instead of an actual value:
expect(typeFn).toHaveBeenCalledWith(expect.stringMatching(/hello\d+/));
Here’s a live example: https://repl.it/@marzelin/FrighteningCapitalConferences
You can use one of the helper functions in expect instead of an actual value:
expect(typeFn).toHaveBeenCalledWith(expect.stringMatching(/hello\d+/));
Here’s a live example: https://repl.it/@marzelin/FrighteningCapitalConferences