new DBObjectCreateEditDeleteScenario(name:, data:, uri: [, options])
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
name: |
String | valid DBObject name |
|
data: |
Object | {create, edit} JSON |
|
uri: |
Object | {create: {route, method}, edit: {route, method}, delete: {route, method}} JSON |
|
options |
Object |
<optional> |
Methods
-
run()
-
Run a test an generate a result
Returns:
promise wrapping an Object which format must be the same as the input of the check() method
- Type
- Promise
-
validate()
-
Tests whether the output of a TestScenario is valid or not
Returns:
wrapping an Object {valid: {boolean}, result: {any}}
- Type
- Promise