question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How is the snapshot path built?

See original GitHub issue

I am having issues understanding how the path of the snapshot files is created when calling toMatchSnapshot. In my example

  • I have a test file called pages.spec.ts and another one called detailsSlideover.spec.ts
  • when running all tests and calling toMatchSnapshot inside of pages.spec.ts the snapshot is stored in …/detailsSlideover.spec.ts-snapshots. See image below.

Unfortunately this is not “stable”, so if I only run tests for the one file explicitly, its snapshots are stored in a folder with the “correct” name.

Any hints on this? Am I missing an important configuration path, is it a race condition in playwright, is it on purpose?

snapshotpath

some context:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mduguecommented, Mar 16, 2022

Hey @aslushnikov sure. I fixed it already the way you pointed me to, but will checkout the old commit later on to provide feedback

1reaction
aslushnikovcommented, Mar 15, 2022

@mdugue do you require pages.spec.ts from detailsSlideover.spec.ts or vice versa?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What exactly is a Maven Snapshot and why do we need it?
A Maven SNAPSHOT is an artifact created by a Maven build and pretends to help developers in the software development cycle.
Read more >
Snapshot Testing - Jest
A typical snapshot test case renders a UI component, takes a snapshot, then compares it to a reference snapshot file stored alongside the...
Read more >
Create Amazon EBS snapshots - AWS Documentation
Create snapshots of an Amazon EBS volume or create multi-volume snapshots to use as a baseline for new volumes or for data backup....
Read more >
How do I change the snapshots directory in VirtualBox on ...
Shutdown intended virtual machine; > 2. Right click on virtual machine, go to Settings > General > Advanced; > 3. Change Snapshots destination...
Read more >
Where do Database Snapshots store the information what ...
The snapshot files contain only the data that has changed from the source. For every file, SQL Server creates a bitmap that is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found