artes 1.2.0 → 1.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -65,8 +65,9 @@ if (fs.existsSync(projectHooksPath)) {
65
65
 
66
66
  BeforeAll(() => {
67
67
  pomCollector();
68
-
69
- projectHooks.BeforeAll()
68
+
69
+ typeof projectHooks.BeforeAll == "function" && projectHooks.BeforeAll()
70
+
70
71
  });
71
72
 
72
73
  Before(async function () {
@@ -110,7 +111,7 @@ Before(async function () {
110
111
  });
111
112
  }
112
113
 
113
- projectHooks.Before()
114
+ typeof projectHooks.Before == "function" && projectHooks.Before();
114
115
  });
115
116
 
116
117
  BeforeStep(({ pickleStep }) => {
@@ -118,7 +119,7 @@ BeforeStep(({ pickleStep }) => {
118
119
  context.response = {};
119
120
  }
120
121
 
121
- projectHooks.BeforeStep()
122
+ typeof projectHooks.BeforeStep == "function" && projectHooks.BeforeStep()
122
123
  });
123
124
 
124
125
  AfterStep(async function ({ pickleStep }) {
@@ -126,7 +127,7 @@ AfterStep(async function ({ pickleStep }) {
126
127
  await attachResponse(this.attach);
127
128
  }
128
129
 
129
- projectHooks.AfterStep()
130
+ typeof projectHooks.AfterStep == "function" && projectHooks.AfterStep()
130
131
  });
131
132
 
132
133
  After(async function ({ pickle, result }) {
@@ -211,7 +212,7 @@ After(async function ({ pickle, result }) {
211
212
  }
212
213
  }
213
214
 
214
- projectHooks.After()
215
+ typeof projectHooks.After == "function" && projectHooks.After()
215
216
  });
216
217
 
217
218
  AfterAll(() => {
@@ -239,5 +240,5 @@ AfterAll(() => {
239
240
  }
240
241
  }
241
242
 
242
- projectHooks.AfterAll()
243
+ typeof projectHooks.AfterAll == "function" && projectHooks.AfterAll()
243
244
  });