Skip to content
New issue

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

Make view test snapshot deterministic #1623

Closed
isaacs opened this issue Aug 5, 2020 · 0 comments
Closed

Make view test snapshot deterministic #1623

isaacs opened this issue Aug 5, 2020 · 0 comments
Labels
Enhancement new feature or improvement pr: needs tests requires tests before merging Release 7.x work is associated with a specific npm 7 release

Comments

@isaacs
Copy link
Contributor

isaacs commented Aug 5, 2020

https://github.com/npm/cli/pull/1622/checks?check_run_id=951548971#step:5:469

Probably a good idea to replace any published .*? ago with a specific known string. Something like this:

t.cleanSnapshot = str => str.replace(/published .*? ago/g, 'published {TIME} ago'))
@darcyclarke darcyclarke added Enhancement new feature or improvement pr: needs tests requires tests before merging Release 7.x work is associated with a specific npm 7 release labels Mar 26, 2021
wraithgar added a commit that referenced this issue Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement pr: needs tests requires tests before merging Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants