Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Specify prints an unpleasant stack trace on failure #414

@williammartin

Description

@williammartin
Specify("doesn't print the right stack trace", func() {
	Fail("fail the test")
})

->

Users/pivotal/go/src/github.com/williammartin/ginkgoleaktest/ginkgoleaktest_test.go:8
  doesn't print the right stack trace [It]
  /Users/pivotal/go/src/github.com/onsi/ginkgo/ginkgo_dsl.go:394

  fail the test

  /Users/pivotal/go/src/github.com/williammartin/ginkgoleaktest/ginkgoleaktest_test.go:11

This line:

/Users/pivotal/go/src/github.com/onsi/ginkgo/ginkgo_dsl.go:394

is pretty useless, and I think it's because Specify( calls It( which sets a codelocation of 1, not pruning the stack correctly:

https://github.com/onsi/ginkgo/blob/master/ginkgo_dsl.go#L365
https://github.com/onsi/ginkgo/blob/master/ginkgo_dsl.go#L339

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions