Skip to content

Conversation

@sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 7, 2025

(adapted from https://github.com/dart-lang/pub/blob/master/test/golden_file.dart)

With this:

  • golden files gets their name from the running test automatically
  • there is a concept of multiple sections in a golden file
  • you can update the golden files by running the tests with _WRITE_GOLDENS=TRUE.
  • You can run a command, and have the command, stdout, stderr and exit code all included in the golden file.
    • and have specific expectation machers on those at the same time
  • missing golden files cause an error on CI.

@sigurdm sigurdm requested a review from isoos November 7, 2025 13:20
@isoos
Copy link
Collaborator

isoos commented Nov 7, 2025

While the filenames with spaces are probably a non-issue, shouldn't we rather have - or _ instead of spaces?

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

Successfully merging this pull request may close these issues.

2 participants