new TestSuite()
A named suite of test cases that are executed altogether. The suite suite is created with
- Source:
Methods
-
after(callback) → {TestSuite}
-
Set a callback executed after the tests.
Parameters:
Name Type Description callbackfunction the callback - Source:
Returns:
a reference to this, so the API can be used fluently- Type
- TestSuite
-
afterEach(callback) → {TestSuite}
-
Set a callback executed after each test and before the suite
aftercallback.Parameters:
Name Type Description callbackfunction the callback - Source:
Returns:
a reference to this, so the API can be used fluently- Type
- TestSuite
-
before(callback) → {TestSuite}
-
Set a callback executed before the tests.
Parameters:
Name Type Description callbackfunction the callback - Source:
Returns:
a reference to this, so the API can be used fluently- Type
- TestSuite
-
beforeEach(callback) → {TestSuite}
-
Set a callback executed before each test and after the suite
beforecallback.Parameters:
Name Type Description callbackfunction the callback - Source:
Returns:
a reference to this, so the API can be used fluently- Type
- TestSuite
-
run(vertx, options) → {TestCompletion}
-
Run the testsuite with the specified
optionsand the specifiedvertxinstance. The test suite will be executed on the event loop provided by thevertxargument when TestOptions is not set tofalse. The returned Completion object can be used to get a completion callback.Parameters:
Name Type Description vertxVertx the vertx instance optionsObject the test options - Source:
Returns:
the related test completion- Type
- TestCompletion
-
test(name, testCase) → {TestSuite}
-
Add a new test case to the suite.
Parameters:
Name Type Description namestring the test case name testCasefunction the test case - Source:
Returns:
a reference to this, so the API can be used fluently- Type
- TestSuite