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

Snapshots break after Deno 1.33.2 #3404

Closed
oscarotero opened this issue May 26, 2023 · 2 comments · Fixed by #3507
Closed

Snapshots break after Deno 1.33.2 #3404

oscarotero opened this issue May 26, 2023 · 2 comments · Fixed by #3507
Labels
suggestion a suggestion yet to be agreed

Comments

@oscarotero
Copy link

Describe the bug
Deno 1.33.2 changed the way to serialize multiline strings and, instead of a single string, it returns a concatenation of several strings, one per line. This makes all tests to fail:

imaxe

Steps to Reproduce

  1. Create a snapshot in Deno < 1.33.2
  2. Upgrade to Deno >= 1.33.2
  3. Run the tests

Expected behavior

The solution is update the snapshots with -- --update (obviously), but I think the previous format was much clearer to see the difference between two snapshots.

Environment

  • OS: All
  • deno version: >= 1.33.2
  • std version: 0.186.0
@oscarotero oscarotero added bug Something isn't working needs triage labels May 26, 2023
@kt3k
Copy link
Member

kt3k commented May 31, 2023

I agree that the previous version was better for comparing snapshots.

This was caused by this change in Deno CLI denoland/deno#18691 (We aligned Deno.inspect behavior to util.inspect of Node.js to reduce the duplications)

@crowlKats Do you know if there's any option to restore the previous behavior for long string values? Or the previous behavior is gone now?

@kt3k kt3k added suggestion a suggestion yet to be agreed and removed bug Something isn't working needs triage labels May 31, 2023
@crowlKats
Copy link
Member

i believe the previous behaviour is completely gone, and would potentially be quite involved to bring back afaik

crowlKats added a commit to denoland/deno that referenced this issue Jun 5, 2023
For denoland/std#3404

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
bartlomieju pushed a commit to denoland/deno that referenced this issue Jun 8, 2023
For denoland/std#3404

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion a suggestion yet to be agreed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants