artes 1.1.15 → 1.1.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -237,16 +237,11 @@ When(
237
237
  When(
238
238
  "User expects that response body should match {string} schema",
239
239
  async function (expectedSchema) {
240
- const schema = selector(expectedSchema);
241
-
242
- const ajv = new Ajv();
243
-
244
- const validate = ajv.compile(schema);
245
-
246
- const responseBody = context.response?.responseBody;
247
-
248
- const valid = validate(responseBody);
249
-
250
- expect(valid).toBe(true);
240
+ const schema = await selector(expectedSchema);
241
+ const ajv = await new Ajv();
242
+ const validate = await ajv.compile(schema);
243
+ const responseBody = await context.response["Response Body"];
244
+ const valid = await validate(responseBody);
245
+ await expect(valid).toBe(true);
251
246
  },
252
247
  );