package kata_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "code.osinet.fr/fgm/codewars/kyu7/the_paperfold_sequence" ) var _ = Describe("PaperFold sequence", func() { It("20 elements", func() { arr := []int{} p := make(chan int, 100) go PaperFold(p) for i := 0; i < 20; i++ { arr = append(arr, <-p) } Expect(arr).To(Equal([]int{1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1})) }) })