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

Configure snapshot folder? #307

Open
fermmm opened this issue May 14, 2024 · 1 comment
Open

Configure snapshot folder? #307

fermmm opened this issue May 14, 2024 · 1 comment

Comments

@fermmm
Copy link

fermmm commented May 14, 2024

I would like to have the snapshots in a snapshots folder just like with Jest, is there a setting to configure this? In my opinion folders looks cleaner when the snapshot files are in their own folder, only a few of my test files have snapshots so there is no consistent snapshot file for each test file, so when I see a snapshot file it looks like a file should not be there and is annoying.

@sz-piotr
Copy link
Member

A big thing about earl is how it doesn't require any configuration. Where would you configure this snapshots folder?

Also, I can tell you about a trick you can use in VSCode to make the snapshots appear under the test files.

Screenshot 2024-05-25 at 14 16 23

// VSCode's settings.json
{
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.expand": false,
  "explorer.fileNesting.patterns": {
    "*.ts": "$(capture).ts, $(capture).ts.snapshot"
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants