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

In test diffs, compare the result to an empty file if no .expected file exists #338

Closed
rdmarsh2 opened this issue Apr 21, 2020 · 2 comments · Fixed by #669
Closed

In test diffs, compare the result to an empty file if no .expected file exists #338

rdmarsh2 opened this issue Apr 21, 2020 · 2 comments · Fixed by #669
Assignees
Labels
enhancement New feature or request VSCode

Comments

@rdmarsh2
Copy link

Is your feature request related to a problem? Please describe.
After creating a new test (with source and query, but no .expected file) and running a test through the test explorer, the "show test output differences" menu item fails with Error: unable to resolve non-existing file.

Describe the solution you'd like
The "Show test output differences" menu item opens a diff window in which the .actual file is compared to an empty file. It might also display a warning message.

Describe alternatives you've considered
The menu item could instead open the .actual file itself, possibly while displaying a warning message.

@rdmarsh2 rdmarsh2 added the enhancement New feature or request label Apr 21, 2020
@aeisenberg
Copy link
Contributor

Would it be sufficient to create an empty expected file and run the diff command as normal (and pop up a warning)?

Then you could easily copy over the actual file into the expected.

@rdmarsh2
Copy link
Author

rdmarsh2 commented Nov 4, 2020

Yeah, that would work. It looks like what we currently do for an expected file without an actual file is to just open the expected file, which would make it easy to see the results, but might be a bit confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VSCode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants