@cuppet/core 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/apiFunctions.js +3 -3
package/package.json
CHANGED
package/src/apiFunctions.js
CHANGED
|
@@ -200,13 +200,13 @@ module.exports = {
|
|
|
200
200
|
*
|
|
201
201
|
* @async
|
|
202
202
|
* @function propertyIs
|
|
203
|
-
* @param {string} property - The property of the response data to check.
|
|
203
|
+
* @param {string} property - The property of the response data to check. Written in root.parent.child syntax.
|
|
204
204
|
* @param {string} type - The type that the property should be.
|
|
205
205
|
* @throws {Error} - Will throw an error if the property is not of the specified type.
|
|
206
206
|
*/
|
|
207
207
|
propertyIs: async function (property, type) {
|
|
208
|
-
const value = this.response.data
|
|
209
|
-
|
|
208
|
+
const value = await helper.getPropertyValue(this.response.data, property);
|
|
209
|
+
assert.typeOf(value, type, `The property is not an ${type}`);
|
|
210
210
|
},
|
|
211
211
|
|
|
212
212
|
/**
|