We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b6546e commit e3e1aa5Copy full SHA for e3e1aa5
packages/artillery-plugin-expect/index.js
@@ -123,15 +123,21 @@ function expectationsPluginCheckExpectations(
123
_.each(expectations, (ex) => {
124
const checker = Object.keys(ex)[0];
125
debug(`checker: ${checker}`);
126
- let result = EXPECTATIONS[checker]?.call(
127
- this,
128
- ex,
129
- body,
130
- req,
131
- res,
132
- userContext
133
- );
134
- results.push(result);
+
+ let result;
+ if (EXPECTATIONS[checker]) {
+ result = EXPECTATIONS[checker].call(
+ this,
+ ex,
+ body,
+ req,
+ res,
135
+ userContext
136
+ );
137
+ results.push(result);
138
+ } else {
139
+ console.log(`Expect Plugin: Expectation '${checker}' is not supported`);
140
+ }
141
});
142
143
userContext.expectations = [].concat(userContext.expectations || []);
0 commit comments