mirror of
https://github.com/hanzo-fi/webhooks.git
synced 2026-10-30 20:32:55 +00:00
18 lines
373 B
Go
18 lines
373 B
Go
package testserver
|
|
|
|
import (
|
|
//nolint:staticcheck
|
|
. "github.com/hanzo-fi/go-libs/v2/testing/utils"
|
|
//nolint:staticcheck
|
|
. "github.com/onsi/ginkgo/v2"
|
|
)
|
|
|
|
func NewTestServer(configurationProvider func() Configuration) *Deferred[*Server] {
|
|
d := NewDeferred[*Server]()
|
|
BeforeEach(func() {
|
|
d.Reset()
|
|
d.SetValue(New(GinkgoT(), configurationProvider()))
|
|
})
|
|
return d
|
|
}
|