-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eunjae Lee
authored
Feb 1, 2022
1 parent
9c1d656
commit e3b7ed8
Showing
4 changed files
with
216 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
[ | ||
{ | ||
"testName": "constructor throws with invalid parameters", | ||
"autoCreateClient": false, | ||
"steps": [ | ||
{ | ||
"type": "createClient", | ||
"expected": { | ||
"error": "`appId` is missing." | ||
} | ||
}, | ||
{ | ||
"type": "createClient", | ||
"parameters": { | ||
"apiKey": "my-api-key" | ||
}, | ||
"expected": { | ||
"error": "`appId` is missing." | ||
} | ||
}, | ||
{ | ||
"type": "createClient", | ||
"parameters": { | ||
"appId": "my-app-id" | ||
}, | ||
"expected": { | ||
"error": "`apiKey` is missing." | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"testName": "`addApiKey` throws with invalid parameters", | ||
"steps": [ | ||
{ | ||
"type": "method", | ||
"object": "$client", | ||
"path": "addApiKey", | ||
"expected": { | ||
"error": "Parameter `apiKey` is required when calling `addApiKey`." | ||
} | ||
}, | ||
{ | ||
"type": "method", | ||
"object": "$client", | ||
"path": "addApiKey", | ||
"parameters": [{}], | ||
"expected": { | ||
"error": "Parameter `apiKey.acl` is required when calling `addApiKey`." | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"testName": "`addOrUpdateObject` throws with invalid parameters", | ||
"steps": [ | ||
{ | ||
"type": "method", | ||
"object": "$client", | ||
"path": "addOrUpdateObject", | ||
"parameters": [{ "objectID": "my-object-id", "body": {} }], | ||
"expected": { | ||
"error": "Parameter `indexName` is required when calling `addOrUpdateObject`." | ||
} | ||
}, | ||
{ | ||
"type": "method", | ||
"object": "$client", | ||
"path": "addOrUpdateObject", | ||
"parameters": [{ "indexName": "my-index-name", "body": {} }], | ||
"expected": { | ||
"error": "Parameter `objectID` is required when calling `addOrUpdateObject`." | ||
} | ||
}, | ||
{ | ||
"type": "method", | ||
"object": "$client", | ||
"path": "addOrUpdateObject", | ||
"parameters": [ | ||
{ "indexName": "my-index-name", "objectID": "my-object-id" } | ||
], | ||
"expected": { | ||
"error": "Parameter `body` is required when calling `addOrUpdateObject`." | ||
} | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters