-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for window arrangement code
The output of the GetWindowDimensions function is hard to understand just by looking at it, so I've added a helper function in the tests to render the window layout as text, so that in order to create a new test you just come up with some args and paste the output as the expected output. This has the same downsides that any snapshot-based testing has: it's more brittle than targeted assertions. But it is much easier to make sense of these snapshots than it is to make sense of more fine-grained assertions, and I like the fact that these tests can serve as documentation.
- Loading branch information
1 parent
b50ea9b
commit 1df9348
Showing
2 changed files
with
368 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.