Interface: ValidationTestConfig
validator.ValidationTestConfig
Configuration for generating automatic data validation tests.
Properties
createSuite
• createSuite: (name
: string
, suite
: () => void
) => void
Callback to create a test suite.
Type declaration
▸ (name
, suite
): void
Parameters
Name | Type |
---|---|
name |
string |
suite |
() => void |
Returns
void
createTest
• createTest: (name
: string
, test
: () => Promise
<void
>) => void
Callback to create a single test.
Type declaration
▸ (name
, test
): void
Parameters
Name | Type |
---|---|
name |
string |
test |
() => Promise <void > |
Returns
void
filePaths
• filePaths: string
[]
Paths to load the JSON data from.
type
• type: string
Display type of the data to be validated. Used only for generating the test names.
validate
• validate: (data
: any
, fs
: FileSystemProvider
) => Promise
<ValidationError
[]>
Validator function to validate the JSON data.
Type declaration
▸ (data
, fs
): Promise
<ValidationError
[]>
Parameters
Name | Type |
---|---|
data |
any |
fs |
FileSystemProvider |
Returns
Promise
<ValidationError
[]>