Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(t *testing.T, s IntegrationSuiteInterface)
Types ¶
type IntegrationSuite ¶
IntegrationSuite is used to create a single node js integration test.
func (*IntegrationSuite) Database ¶
func (s *IntegrationSuite) Database() datas.Database
func (*IntegrationSuite) DatabaseSpecString ¶
func (s *IntegrationSuite) DatabaseSpecString() string
DatabaseSpecString returns the spec for the database to test against.
func (*IntegrationSuite) NodeOutput ¶
func (s *IntegrationSuite) NodeOutput() string
func (*IntegrationSuite) ValueSpecString ¶
func (s *IntegrationSuite) ValueSpecString(value string) string
ValueSpecString returns the value spec for the value to test against.
type IntegrationSuiteInterface ¶
type IntegrationSuiteInterface interface { suite.TestingSuite // DatabaseSpecString returns the spec for the test database. DatabaseSpecString() string // ValueSpecString returns the spec for the value in the test database. ValueSpecString(value string) string // Database is the underlying db that is bing changed. Database() datas.Database // NodeOutput is the result (stdout) of running the node program. NodeOutput() string // contains filtered or unexported methods }
IntegrationSuiteInterface is the interface that IntegrationSuite implements.
type NodeArgsSuite ¶
type NodeArgsSuite interface {
NodeArgs() []string
}
NodeArgsSuite is the interface to implement if you want to provide extra arguments to node. If this is not implemented we call `node .`
type SetupSuite ¶
type SetupSuite interface {
Setup()
}
SetupSuite is the interface to implement if you need to run some code before the server is started.
type TeardownSuite ¶
type TeardownSuite interface {
Teardown()
}
TeardownSuite is the interface to implement if you want to run some code after the server is stopped.
Click to show internal directories.
Click to hide internal directories.