-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(console): console testing (#629)
* test(console): added teatest * fix: function arg * test(console): additional console tests * fix: quit routine * fix: test * fix: FinalModel teatest fix * fix: nil check * docs: console testing info * deps: updated bubbletea deps * fix: updated expected comp-defn
- Loading branch information
1 parent
b342f63
commit 78e4ae9
Showing
14 changed files
with
494 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Console Testing | ||
|
||
The Lula Console is a text-based terminal user interface that allows users to interact with the OSCAL documents and is written using the [Bubble Tea](/~https://github.com/charmbracelet/bubbletea) library. | ||
|
||
To test the Lula Console, we've implemented [teatest](https://pkg.go.dev/github.com/charmbracelet/x/exp/teatest), which allows us to generate "golden" snapshots of the console output, then ensure the test results match that expected output. | ||
|
||
## Usage | ||
|
||
To update the golden snapshot for the Lula Console, run the following command: | ||
|
||
```shell | ||
go test ./src/internal/tui/model_test.go -update | ||
``` | ||
|
||
This will update the golden snapshot files in the `testdata` directory. |
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
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
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
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
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.