mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
chore: make CatchPanics an option flag
This commit is contained in:
@@ -25,13 +25,6 @@ func TestOptions(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("catch panics", func(t *testing.T) {
|
||||
p := NewProgram(nil, WithoutCatchPanics())
|
||||
if p.CatchPanics {
|
||||
t.Errorf("catch panics should not have been set")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("renderer", func(t *testing.T) {
|
||||
p := NewProgram(nil, WithoutRenderer())
|
||||
switch p.renderer.(type) {
|
||||
@@ -62,6 +55,10 @@ func TestOptions(t *testing.T) {
|
||||
exercise(t, WithANSICompressor(), withANSICompressor)
|
||||
})
|
||||
|
||||
t.Run("without catch panics", func(t *testing.T) {
|
||||
exercise(t, WithoutCatchPanics(), withoutCatchPanics)
|
||||
})
|
||||
|
||||
t.Run("without signal handler", func(t *testing.T) {
|
||||
exercise(t, WithoutSignalHandler(), withoutSignalHandler)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user