Skip to content

Interactive snapshot update/create mode #2229

@mrspartak

Description

@mrspartak

Clear and concise description of the problem

We are testing media assets, by matching their md5 basically. So we have a suit, that basically calls the same render function but in different contexts (projects, parameters). Basically, the output must be validated before confirming, that this md5 should be a snapshot.
Jest has an interactive mode, but async describe is not a thing anymore, so we tried to switch to Vitest.

Suggested solution

  1. Maybe do not create snapshots by default (I know, that env CI=1 solves it)
  2. Have interactive update/create mode, that does 1 test at a time and asks to validate output

Alternative

I could implement it myself but have no way to interrupt runner and it just times out. Also, libraries such as enquirer do not work during the run.

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions