Skip to content

Use Jest snapshot testing in testUtils #135

@Daniel15

Description

@Daniel15

Jest 14 adds snapshot testing: https://facebook.github.io/jest/blog/2016/07/27/jest-14.html. One of the advantages is that it allows snapshots to be automatically updated by running jest -u.

Currently we manually load the expected result and compare with toEqual: https://github.com/facebook/jscodeshift/blob/master/src/testUtils.js#L68. I think this could be replaced with snapshot testing, avoiding the need for us to manually load the file containing the expected result.

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