I'm using the following:
- Node.js: 9.8.0
- Jest: 22.4.2
There's an array like the following being returned from myFunction:
[
...
{
id: 00000000,
path: "www.someUrl.com/some/path/to"
}
...
]
And I want to match it against the following kind of array:
const output = [
...
{
id: 00000000,
path: "path/some/path/to"
}
...
]
In a nutshell: I want to totally match the id, but only partially the path.
But I just don't know how... I've tried the following:
expect(myFunction()).toEqual(expect.arrayContaining(output));
But the gives me an error.