We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.toMatchSnapshot
Describe the issue Currently there are a lot of cases where it makes sense to use .toMatchSnapshot instead of .toEqual.
.toEqual
Expected In tests such as this example of graph.builder.spec.js, replace usages of super verbose and gigantic toEqual for toMatchSnapshot.
toEqual
toMatchSnapshot
Example:
expect(props).toEqual({ ...that.node, className: "node", cursor: "pointer", cx: 1, cy: 2, dx: 15.5, fill: "red", fontSize: 12, fontWeight: "bold", fontColor: "black", id: "id", label: "id", onClickNode: undefined, onRightClickNode: undefined, onMouseOut: undefined, onMouseOverNode: undefined, opacity: 1, renderLabel: true, size: 200, stroke: "yellow", strokeWidth: 2, svg: "file.svg", type: "circle", viewGenerator: null, overrideGlobalViewGenerator: undefined, });
Feel free to look around for other use cases that might make sense.
The text was updated successfully, but these errors were encountered:
I would like to take this issue 👍🏻
Sorry, something went wrong.
Go for it @nguyenami 💪
Closing this with #243
jaydinsweo
No branches or pull requests
Describe the issue
Currently there are a lot of cases where it makes sense to use .toMatchSnapshot instead of
.toEqual
.Expected
In tests such as this example of graph.builder.spec.js, replace usages of super verbose and gigantic
toEqual
fortoMatchSnapshot
.Example:
Files that should be tackled
Feel free to look around for other use cases that might make sense.
The text was updated successfully, but these errors were encountered: