+
Skip to content

Support DescribeTableSubtree in ginkgo outline #1556

@cpkurotori

Description

@cpkurotori

When running ginkgo outline on a test file that has a DescribeTableSubtree, this relationship doesn't seem to be reflected in the outline. This is causing issues when using https://github.com/joselitofilho/ginkgoTestExplorer

Example test file:

package main

import (
	"testing"

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

func Test(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Test")
}

var _ = Describe("Describe", func() {
	DescribeTableSubtree("Subtree", func() {
		It("It", func() {
			Expect(true).To(BeTrue())
		})
	},
		Entry("EntrySubtree"),
		Entry("EntrySubtree2"),
	)
	DescribeTable("Table", func() {
		Expect(true).To(BeTrue())
	},
		Entry("EntryTable"),
		Entry("EntryTable2"),
	)
})

ginkgo outline main_test.go:

Name,Text,Start,End,Spec,Focused,Pending,Labels
Describe,Describe,182,483,false,false,false,
It,It,256,307,true,false,false,
Entry,EntrySubtree,314,335,true,false,false,
Entry,EntrySubtree2,339,361,true,false,false,
DescribeTable,Table,367,480,false,false,false,
Entry,EntryTable,433,452,true,false,false,
Entry,EntryTable2,456,476,true,false,false,

I'm not sure what the expected output would since I'm not very familiar with the outline api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载