RethinkDB Test provides helpers to load fixtures, data providers and more.
RethinkDB Test provides helpers to load fixtures, data providers and more. It's part of Igthorn project
Please refer to unit tests of this module - they contain sample use cases.
Test class implements following methods:
-
constructor(testPath:string) : self
sets test file's path
-
executeFixtureScript(fileName, callback) : void
executes passed fixtures script file and calls callback function (for example mocha's done)
-
getDataProvider(fileName) : mixed
requires data provider file and returns it's exported data
-
setTestPath(testPath:string) : self
sets test file's path
-
getTestPath() : string
gets test file's path
-
setTestFixturesDirPath(testFixturesDirPath:string) : self
sets test's fixtures directory path
-
getTestFixturesDirPath() : string
gets test's fixtures directory path
-
setTestDataProvidersDirPath(testDataProvidersDirPath:string) : self
sets test's data providers directory path
-
getTestDataProvidersDirPath() : string
gets test's data providers directory path