Skip to content

Commit

Permalink
test: reproduce issue #1
Browse files Browse the repository at this point in the history
default output format is sometimes nil
  • Loading branch information
davidalpert committed Nov 19, 2023
1 parent db5a50f commit 823f4a1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions v1/v1_tests.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package printers

import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

var _ = Describe("go-printers", func() {
Describe("#NewPrinterOptions", func() {
var o *PrinterOptions

BeforeEach(func() {
o = NewPrinterOptions()
})

It("should set default output to text", func() {
Ω(o.DefaultOutputFormat).ShouldNot(BeNil())
Ω(*o.DefaultOutputFormat).Should(Equal("text"))
})

It("should set output to nil", func() {
Ω(o.OutputFormat).Should(BeNil())
})
})
})

0 comments on commit 823f4a1

Please sign in to comment.