@locustjs/test 2.0.1 → 2.0.2

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/dist/index.js CHANGED
@@ -5,6 +5,9 @@ var fs = require('fs');
5
5
  var path = require('path');
6
6
  var exception = require('@locustjs/exception');
7
7
 
8
+ function _OverloadYield(e, d) {
9
+ this.v = e, this.k = d;
10
+ }
8
11
  function _arrayLikeToArray(r, a) {
9
12
  (null == a || a > r.length) && (a = r.length);
10
13
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -143,306 +146,178 @@ function _possibleConstructorReturn(t, e) {
143
146
  if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
144
147
  return _assertThisInitialized(t);
145
148
  }
146
- function _regeneratorRuntime() {
147
- _regeneratorRuntime = function () {
148
- return e;
149
- };
150
- var t,
151
- e = {},
152
- r = Object.prototype,
153
- n = r.hasOwnProperty,
154
- o = Object.defineProperty || function (t, e, r) {
155
- t[e] = r.value;
156
- },
157
- i = "function" == typeof Symbol ? Symbol : {},
158
- a = i.iterator || "@@iterator",
159
- c = i.asyncIterator || "@@asyncIterator",
160
- u = i.toStringTag || "@@toStringTag";
161
- function define(t, e, r) {
162
- return Object.defineProperty(t, e, {
163
- value: r,
164
- enumerable: true,
165
- configurable: true,
166
- writable: true
167
- }), t[e];
168
- }
169
- try {
170
- define({}, "");
171
- } catch (t) {
172
- define = function (t, e, r) {
173
- return t[e] = r;
174
- };
175
- }
176
- function wrap(t, e, r, n) {
177
- var i = e && e.prototype instanceof Generator ? e : Generator,
178
- a = Object.create(i.prototype),
179
- c = new Context(n || []);
180
- return o(a, "_invoke", {
181
- value: makeInvokeMethod(t, r, c)
182
- }), a;
183
- }
184
- function tryCatch(t, e, r) {
185
- try {
186
- return {
187
- type: "normal",
188
- arg: t.call(e, r)
189
- };
190
- } catch (t) {
191
- return {
192
- type: "throw",
193
- arg: t
149
+ function _regenerator() {
150
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
151
+ var e,
152
+ t,
153
+ r = "function" == typeof Symbol ? Symbol : {},
154
+ n = r.iterator || "@@iterator",
155
+ o = r.toStringTag || "@@toStringTag";
156
+ function i(r, n, o, i) {
157
+ var c = n && n.prototype instanceof Generator ? n : Generator,
158
+ u = Object.create(c.prototype);
159
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
160
+ var i,
161
+ c,
162
+ u,
163
+ f = 0,
164
+ p = o || [],
165
+ y = false,
166
+ G = {
167
+ p: 0,
168
+ n: 0,
169
+ v: e,
170
+ a: d,
171
+ f: d.bind(e, 4),
172
+ d: function (t, r) {
173
+ return i = t, c = 0, u = e, G.n = r, a;
174
+ }
175
+ };
176
+ function d(r, n) {
177
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
178
+ var o,
179
+ i = p[t],
180
+ d = G.p,
181
+ l = i[2];
182
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
183
+ }
184
+ if (o || r > 1) return a;
185
+ throw y = true, n;
186
+ }
187
+ return function (o, p, l) {
188
+ if (f > 1) throw TypeError("Generator is already running");
189
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
190
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
191
+ try {
192
+ if (f = 2, i) {
193
+ if (c || (o = "next"), t = i[o]) {
194
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
195
+ if (!t.done) return t;
196
+ u = t.value, c < 2 && (c = 0);
197
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
198
+ i = e;
199
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
200
+ } catch (t) {
201
+ i = e, c = 1, u = t;
202
+ } finally {
203
+ f = 1;
204
+ }
205
+ }
206
+ return {
207
+ value: t,
208
+ done: y
209
+ };
194
210
  };
195
- }
211
+ }(r, o, i), true), u;
196
212
  }
197
- e.wrap = wrap;
198
- var h = "suspendedStart",
199
- l = "suspendedYield",
200
- f = "executing",
201
- s = "completed",
202
- y = {};
213
+ var a = {};
203
214
  function Generator() {}
204
215
  function GeneratorFunction() {}
205
216
  function GeneratorFunctionPrototype() {}
206
- var p = {};
207
- define(p, a, function () {
217
+ t = Object.getPrototypeOf;
218
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
219
+ return this;
220
+ }), t),
221
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
222
+ function f(e) {
223
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
224
+ }
225
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
208
226
  return this;
227
+ }), _regeneratorDefine(u, "toString", function () {
228
+ return "[object Generator]";
229
+ }), (_regenerator = function () {
230
+ return {
231
+ w: i,
232
+ m: f
233
+ };
234
+ })();
235
+ }
236
+ function _regeneratorAsync(n, e, r, t, o) {
237
+ var a = _regeneratorAsyncGen(n, e, r, t, o);
238
+ return a.next().then(function (n) {
239
+ return n.done ? n.value : a.next();
209
240
  });
210
- var d = Object.getPrototypeOf,
211
- v = d && d(d(values([])));
212
- v && v !== r && n.call(v, a) && (p = v);
213
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
214
- function defineIteratorMethods(t) {
215
- ["next", "throw", "return"].forEach(function (e) {
216
- define(t, e, function (t) {
217
- return this._invoke(e, t);
241
+ }
242
+ function _regeneratorAsyncGen(r, e, t, o, n) {
243
+ return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
244
+ }
245
+ function _regeneratorAsyncIterator(t, e) {
246
+ function n(r, o, i, f) {
247
+ try {
248
+ var c = t[r](o),
249
+ u = c.value;
250
+ return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
251
+ n("next", t, i, f);
252
+ }, function (t) {
253
+ n("throw", t, i, f);
254
+ }) : e.resolve(u).then(function (t) {
255
+ c.value = t, i(c);
256
+ }, function (t) {
257
+ return n("throw", t, i, f);
218
258
  });
219
- });
259
+ } catch (t) {
260
+ f(t);
261
+ }
220
262
  }
221
- function AsyncIterator(t, e) {
222
- function invoke(r, o, i, a) {
223
- var c = tryCatch(t[r], t, o);
224
- if ("throw" !== c.type) {
225
- var u = c.arg,
226
- h = u.value;
227
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
228
- invoke("next", t, i, a);
229
- }, function (t) {
230
- invoke("throw", t, i, a);
231
- }) : e.resolve(h).then(function (t) {
232
- u.value = t, i(u);
233
- }, function (t) {
234
- return invoke("throw", t, i, a);
235
- });
236
- }
237
- a(c.arg);
238
- }
239
- var r;
240
- o(this, "_invoke", {
241
- value: function (t, n) {
242
- function callInvokeWithMethodAndArg() {
243
- return new e(function (e, r) {
244
- invoke(t, n, e, r);
245
- });
246
- }
247
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
248
- }
249
- });
263
+ var r;
264
+ this.next || (_regeneratorDefine(_regeneratorAsyncIterator.prototype), _regeneratorDefine(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
265
+ return this;
266
+ })), _regeneratorDefine(this, "_invoke", function (t, o, i) {
267
+ function f() {
268
+ return new e(function (e, r) {
269
+ n(t, i, e, r);
270
+ });
271
+ }
272
+ return r = r ? r.then(f, f) : f();
273
+ }, true);
274
+ }
275
+ function _regeneratorDefine(e, r, n, t) {
276
+ var i = Object.defineProperty;
277
+ try {
278
+ i({}, "", {});
279
+ } catch (e) {
280
+ i = 0;
250
281
  }
251
- function makeInvokeMethod(e, r, n) {
252
- var o = h;
253
- return function (i, a) {
254
- if (o === f) throw Error("Generator is already running");
255
- if (o === s) {
256
- if ("throw" === i) throw a;
257
- return {
258
- value: t,
259
- done: true
282
+ _regeneratorDefine = function (e, r, n, t) {
283
+ function o(r, n) {
284
+ _regeneratorDefine(e, r, function (e) {
285
+ return this._invoke(r, n, e);
286
+ });
287
+ }
288
+ r ? i ? i(e, r, {
289
+ value: n,
290
+ enumerable: !t,
291
+ configurable: !t,
292
+ writable: !t
293
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
294
+ }, _regeneratorDefine(e, r, n, t);
295
+ }
296
+ function _regeneratorKeys(e) {
297
+ var n = Object(e),
298
+ r = [];
299
+ for (var t in n) r.unshift(t);
300
+ return function e() {
301
+ for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e;
302
+ return e.done = true, e;
303
+ };
304
+ }
305
+ function _regeneratorValues(e) {
306
+ if (null != e) {
307
+ var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
308
+ r = 0;
309
+ if (t) return t.call(e);
310
+ if ("function" == typeof e.next) return e;
311
+ if (!isNaN(e.length)) return {
312
+ next: function () {
313
+ return e && r >= e.length && (e = undefined), {
314
+ value: e && e[r++],
315
+ done: !e
260
316
  };
261
317
  }
262
- for (n.method = i, n.arg = a;;) {
263
- var c = n.delegate;
264
- if (c) {
265
- var u = maybeInvokeDelegate(c, n);
266
- if (u) {
267
- if (u === y) continue;
268
- return u;
269
- }
270
- }
271
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
272
- if (o === h) throw o = s, n.arg;
273
- n.dispatchException(n.arg);
274
- } else "return" === n.method && n.abrupt("return", n.arg);
275
- o = f;
276
- var p = tryCatch(e, r, n);
277
- if ("normal" === p.type) {
278
- if (o = n.done ? s : l, p.arg === y) continue;
279
- return {
280
- value: p.arg,
281
- done: n.done
282
- };
283
- }
284
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
285
- }
286
318
  };
287
319
  }
288
- function maybeInvokeDelegate(e, r) {
289
- var n = r.method,
290
- o = e.iterator[n];
291
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
292
- var i = tryCatch(o, e.iterator, r.arg);
293
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
294
- var a = i.arg;
295
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
296
- }
297
- function pushTryEntry(t) {
298
- var e = {
299
- tryLoc: t[0]
300
- };
301
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
302
- }
303
- function resetTryEntry(t) {
304
- var e = t.completion || {};
305
- e.type = "normal", delete e.arg, t.completion = e;
306
- }
307
- function Context(t) {
308
- this.tryEntries = [{
309
- tryLoc: "root"
310
- }], t.forEach(pushTryEntry, this), this.reset(true);
311
- }
312
- function values(e) {
313
- if (e || "" === e) {
314
- var r = e[a];
315
- if (r) return r.call(e);
316
- if ("function" == typeof e.next) return e;
317
- if (!isNaN(e.length)) {
318
- var o = -1,
319
- i = function next() {
320
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
321
- return next.value = t, next.done = true, next;
322
- };
323
- return i.next = i;
324
- }
325
- }
326
- throw new TypeError(typeof e + " is not iterable");
327
- }
328
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
329
- value: GeneratorFunctionPrototype,
330
- configurable: true
331
- }), o(GeneratorFunctionPrototype, "constructor", {
332
- value: GeneratorFunction,
333
- configurable: true
334
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
335
- var e = "function" == typeof t && t.constructor;
336
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
337
- }, e.mark = function (t) {
338
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
339
- }, e.awrap = function (t) {
340
- return {
341
- __await: t
342
- };
343
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
344
- return this;
345
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
346
- undefined === i && (i = Promise);
347
- var a = new AsyncIterator(wrap(t, r, n, o), i);
348
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
349
- return t.done ? t.value : a.next();
350
- });
351
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
352
- return this;
353
- }), define(g, "toString", function () {
354
- return "[object Generator]";
355
- }), e.keys = function (t) {
356
- var e = Object(t),
357
- r = [];
358
- for (var n in e) r.push(n);
359
- return r.reverse(), function next() {
360
- for (; r.length;) {
361
- var t = r.pop();
362
- if (t in e) return next.value = t, next.done = false, next;
363
- }
364
- return next.done = true, next;
365
- };
366
- }, e.values = values, Context.prototype = {
367
- constructor: Context,
368
- reset: function (e) {
369
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
370
- },
371
- stop: function () {
372
- this.done = true;
373
- var t = this.tryEntries[0].completion;
374
- if ("throw" === t.type) throw t.arg;
375
- return this.rval;
376
- },
377
- dispatchException: function (e) {
378
- if (this.done) throw e;
379
- var r = this;
380
- function handle(n, o) {
381
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
382
- }
383
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
384
- var i = this.tryEntries[o],
385
- a = i.completion;
386
- if ("root" === i.tryLoc) return handle("end");
387
- if (i.tryLoc <= this.prev) {
388
- var c = n.call(i, "catchLoc"),
389
- u = n.call(i, "finallyLoc");
390
- if (c && u) {
391
- if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
392
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
393
- } else if (c) {
394
- if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
395
- } else {
396
- if (!u) throw Error("try statement without catch or finally");
397
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
398
- }
399
- }
400
- }
401
- },
402
- abrupt: function (t, e) {
403
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
404
- var o = this.tryEntries[r];
405
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
406
- var i = o;
407
- break;
408
- }
409
- }
410
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
411
- var a = i ? i.completion : {};
412
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
413
- },
414
- complete: function (t, e) {
415
- if ("throw" === t.type) throw t.arg;
416
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
417
- },
418
- finish: function (t) {
419
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
420
- var r = this.tryEntries[e];
421
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
422
- }
423
- },
424
- catch: function (t) {
425
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
426
- var r = this.tryEntries[e];
427
- if (r.tryLoc === t) {
428
- var n = r.completion;
429
- if ("throw" === n.type) {
430
- var o = n.arg;
431
- resetTryEntry(r);
432
- }
433
- return o;
434
- }
435
- }
436
- throw Error("illegal catch attempt");
437
- },
438
- delegateYield: function (e, r, n) {
439
- return this.delegate = {
440
- iterator: values(e),
441
- resultName: r,
442
- nextLoc: n
443
- }, "next" === this.method && (this.arg = t), y;
444
- }
445
- }, e;
320
+ throw new TypeError(typeof e + " is not iterable");
446
321
  }
447
322
  function _setPrototypeOf(t, e) {
448
323
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
@@ -482,6 +357,74 @@ function _unsupportedIterableToArray(r, a) {
482
357
  return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
483
358
  }
484
359
  }
360
+ function _regeneratorRuntime() {
361
+
362
+ var r = _regenerator(),
363
+ e = r.m(_regeneratorRuntime),
364
+ t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
365
+ function n(r) {
366
+ var e = "function" == typeof r && r.constructor;
367
+ return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
368
+ }
369
+ var o = {
370
+ throw: 1,
371
+ return: 2,
372
+ break: 3,
373
+ continue: 3
374
+ };
375
+ function a(r) {
376
+ var e, t;
377
+ return function (n) {
378
+ e || (e = {
379
+ stop: function () {
380
+ return t(n.a, 2);
381
+ },
382
+ catch: function () {
383
+ return n.v;
384
+ },
385
+ abrupt: function (r, e) {
386
+ return t(n.a, o[r], e);
387
+ },
388
+ delegateYield: function (r, o, a) {
389
+ return e.resultName = o, t(n.d, _regeneratorValues(r), a);
390
+ },
391
+ finish: function (r) {
392
+ return t(n.f, r);
393
+ }
394
+ }, t = function (r, t, o) {
395
+ n.p = e.prev, n.n = e.next;
396
+ try {
397
+ return r(t, o);
398
+ } finally {
399
+ e.next = n.n;
400
+ }
401
+ }), e.resultName && (e[e.resultName] = n.v, e.resultName = undefined), e.sent = n.v, e.next = n.n;
402
+ try {
403
+ return r.call(this, e);
404
+ } finally {
405
+ n.p = e.prev, n.n = e.next;
406
+ }
407
+ };
408
+ }
409
+ return (_regeneratorRuntime = function () {
410
+ return {
411
+ wrap: function (e, t, n, o) {
412
+ return r.w(a(e), t, n, o && o.reverse());
413
+ },
414
+ isGeneratorFunction: n,
415
+ mark: r.m,
416
+ awrap: function (r, e) {
417
+ return new _OverloadYield(r, e);
418
+ },
419
+ AsyncIterator: _regeneratorAsyncIterator,
420
+ async: function (r, e, t, o, u) {
421
+ return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
422
+ },
423
+ keys: _regeneratorKeys,
424
+ values: _regeneratorValues
425
+ };
426
+ })();
427
+ }
485
428
 
486
429
  var TestException = /*#__PURE__*/function (_Exception) {
487
430
  function TestException() {
@@ -496,17 +439,17 @@ var Expect = /*#__PURE__*/function () {
496
439
  function Expect(value) {
497
440
  _classCallCheck(this, Expect);
498
441
  this.value = value;
499
- this._expected = false;
442
+ this._satisfied = false;
500
443
  }
501
444
  return _createClass(Expect, [{
502
- key: "expected",
445
+ key: "satisfied",
503
446
  get: function get() {
504
- return this._expected;
447
+ return this._satisfied;
505
448
  }
506
449
  }, {
507
450
  key: "toBe",
508
451
  value: function toBe(value) {
509
- this._expected = true;
452
+ this._satisfied = true;
510
453
  if (this.value === value) ; else {
511
454
  throw new TestException({
512
455
  message: "".concat(this.value, " is not equal to ").concat(value),
@@ -519,7 +462,7 @@ var Expect = /*#__PURE__*/function () {
519
462
  }, {
520
463
  key: "notToBe",
521
464
  value: function notToBe(value) {
522
- this._expected = true;
465
+ this._satisfied = true;
523
466
  if (this.value === value) {
524
467
  throw new TestException({
525
468
  message: "".concat(value, " is equal to ").concat(this.value),
@@ -532,7 +475,7 @@ var Expect = /*#__PURE__*/function () {
532
475
  }, {
533
476
  key: "toBeGt",
534
477
  value: function toBeGt(value) {
535
- this._expected = true;
478
+ this._satisfied = true;
536
479
  if (this.value <= value) {
537
480
  throw new TestException({
538
481
  message: "".concat(this.value, " is not greater than ").concat(value),
@@ -550,7 +493,7 @@ var Expect = /*#__PURE__*/function () {
550
493
  }, {
551
494
  key: "toBeGte",
552
495
  value: function toBeGte(value) {
553
- this._expected = true;
496
+ this._satisfied = true;
554
497
  if (this.value < value) {
555
498
  throw new TestException({
556
499
  message: "".concat(this.value, " is not greater than or equal to ").concat(value),
@@ -568,7 +511,7 @@ var Expect = /*#__PURE__*/function () {
568
511
  }, {
569
512
  key: "toBeLt",
570
513
  value: function toBeLt(value) {
571
- this._expected = true;
514
+ this._satisfied = true;
572
515
  if (this.value >= value) {
573
516
  throw new TestException({
574
517
  message: "".concat(this.value, " is not less than ").concat(value),
@@ -586,7 +529,7 @@ var Expect = /*#__PURE__*/function () {
586
529
  }, {
587
530
  key: "toBeLte",
588
531
  value: function toBeLte(value) {
589
- this._expected = true;
532
+ this._satisfied = true;
590
533
  if (this.value > value) {
591
534
  throw new TestException({
592
535
  message: "".concat(this.value, " is not less than or equal to ").concat(value),
@@ -604,7 +547,7 @@ var Expect = /*#__PURE__*/function () {
604
547
  }, {
605
548
  key: "toBeBetween",
606
549
  value: function toBeBetween(n, m) {
607
- this._expected = true;
550
+ this._satisfied = true;
608
551
  if (!(this.value >= n && this.value < m)) {
609
552
  throw new TestException({
610
553
  message: "".concat(this.value, " is not between ").concat(n, " and ").concat(m),
@@ -617,7 +560,7 @@ var Expect = /*#__PURE__*/function () {
617
560
  }, {
618
561
  key: "notToBeBetween",
619
562
  value: function notToBeBetween(n, m) {
620
- this._expected = true;
563
+ this._satisfied = true;
621
564
  if (this.value >= n && this.value < m) {
622
565
  throw new TestException({
623
566
  message: "".concat(this.value, " is between ").concat(n, " and ").concat(m),
@@ -630,7 +573,7 @@ var Expect = /*#__PURE__*/function () {
630
573
  }, {
631
574
  key: "toBeOfType",
632
575
  value: function toBeOfType(type) {
633
- this._expected = true;
576
+ this._satisfied = true;
634
577
  if (_typeof(this.value) !== type) {
635
578
  throw new TestException({
636
579
  message: "".concat(this.value, " is not of type ").concat(type),
@@ -643,7 +586,7 @@ var Expect = /*#__PURE__*/function () {
643
586
  }, {
644
587
  key: "notToBeOfType",
645
588
  value: function notToBeOfType(type) {
646
- this._expected = true;
589
+ this._satisfied = true;
647
590
  if (_typeof(this.value) === type) {
648
591
  throw new TestException({
649
592
  message: "".concat(this.value, " is of type ").concat(type),
@@ -656,7 +599,7 @@ var Expect = /*#__PURE__*/function () {
656
599
  }, {
657
600
  key: "toBeString",
658
601
  value: function toBeString() {
659
- this._expected = true;
602
+ this._satisfied = true;
660
603
  if (!base.isString(this.value)) {
661
604
  throw new TestException({
662
605
  message: "".concat(this.value, " is not string"),
@@ -669,7 +612,7 @@ var Expect = /*#__PURE__*/function () {
669
612
  }, {
670
613
  key: "notToBeString",
671
614
  value: function notToBeString() {
672
- this._expected = true;
615
+ this._satisfied = true;
673
616
  if (base.isString(this.value)) {
674
617
  throw new TestException({
675
618
  message: "".concat(this.value, " is string"),
@@ -682,7 +625,7 @@ var Expect = /*#__PURE__*/function () {
682
625
  }, {
683
626
  key: "toBeSomeString",
684
627
  value: function toBeSomeString() {
685
- this._expected = true;
628
+ this._satisfied = true;
686
629
  if (!base.isSomeString(this.value)) {
687
630
  throw new TestException({
688
631
  message: "".concat(this.value, " is not some string"),
@@ -695,7 +638,7 @@ var Expect = /*#__PURE__*/function () {
695
638
  }, {
696
639
  key: "notToBeSomeString",
697
640
  value: function notToBeSomeString() {
698
- this._expected = true;
641
+ this._satisfied = true;
699
642
  if (base.isSomeString(this.value)) {
700
643
  throw new TestException({
701
644
  message: "".concat(this.value, " is some string"),
@@ -708,7 +651,7 @@ var Expect = /*#__PURE__*/function () {
708
651
  }, {
709
652
  key: "toBeNumber",
710
653
  value: function toBeNumber() {
711
- this._expected = true;
654
+ this._satisfied = true;
712
655
  if (!base.isNumber(this.value)) {
713
656
  throw new TestException({
714
657
  message: "".concat(this.value, " is not number"),
@@ -721,7 +664,7 @@ var Expect = /*#__PURE__*/function () {
721
664
  }, {
722
665
  key: "notToBeNumber",
723
666
  value: function notToBeNumber() {
724
- this._expected = true;
667
+ this._satisfied = true;
725
668
  if (base.isNumber(this.value)) {
726
669
  throw new TestException({
727
670
  message: "".concat(this.value, " is number"),
@@ -734,7 +677,7 @@ var Expect = /*#__PURE__*/function () {
734
677
  }, {
735
678
  key: "toBeDate",
736
679
  value: function toBeDate() {
737
- this._expected = true;
680
+ this._satisfied = true;
738
681
  if (!base.isDate(this.value)) {
739
682
  throw new TestException({
740
683
  message: "".concat(this.value, " is not date"),
@@ -747,7 +690,7 @@ var Expect = /*#__PURE__*/function () {
747
690
  }, {
748
691
  key: "notToBeDate",
749
692
  value: function notToBeDate() {
750
- this._expected = true;
693
+ this._satisfied = true;
751
694
  if (base.isDate(this.value)) {
752
695
  throw new TestException({
753
696
  message: "".concat(this.value, " is date"),
@@ -760,7 +703,7 @@ var Expect = /*#__PURE__*/function () {
760
703
  }, {
761
704
  key: "toBeBool",
762
705
  value: function toBeBool() {
763
- this._expected = true;
706
+ this._satisfied = true;
764
707
  if (!base.isBool(this.value)) {
765
708
  throw new TestException({
766
709
  message: "".concat(this.value, " is not bool"),
@@ -773,7 +716,7 @@ var Expect = /*#__PURE__*/function () {
773
716
  }, {
774
717
  key: "notToBeBool",
775
718
  value: function notToBeBool() {
776
- this._expected = true;
719
+ this._satisfied = true;
777
720
  if (base.isBool(this.value)) {
778
721
  throw new TestException({
779
722
  message: "".concat(this.value, " is bool"),
@@ -786,7 +729,7 @@ var Expect = /*#__PURE__*/function () {
786
729
  }, {
787
730
  key: "toBeBasicType",
788
731
  value: function toBeBasicType() {
789
- this._expected = true;
732
+ this._satisfied = true;
790
733
  if (!base.isBasic(this.value)) {
791
734
  throw new TestException({
792
735
  message: "".concat(this.value, " is not basic type"),
@@ -799,7 +742,7 @@ var Expect = /*#__PURE__*/function () {
799
742
  }, {
800
743
  key: "notToBeBasicType",
801
744
  value: function notToBeBasicType() {
802
- this._expected = true;
745
+ this._satisfied = true;
803
746
  if (base.isBasic(this.value)) {
804
747
  throw new TestException({
805
748
  message: "".concat(this.value, " is basic type"),
@@ -812,7 +755,7 @@ var Expect = /*#__PURE__*/function () {
812
755
  }, {
813
756
  key: "toBePrimitive",
814
757
  value: function toBePrimitive() {
815
- this._expected = true;
758
+ this._satisfied = true;
816
759
  if (!base.isPrimitive(this.value)) {
817
760
  throw new TestException({
818
761
  message: "".concat(this.value, " is not primitive type"),
@@ -825,7 +768,7 @@ var Expect = /*#__PURE__*/function () {
825
768
  }, {
826
769
  key: "notToBePrimitive",
827
770
  value: function notToBePrimitive() {
828
- this._expected = true;
771
+ this._satisfied = true;
829
772
  if (base.isPrimitive(this.value)) {
830
773
  throw new TestException({
831
774
  message: "".concat(this.value, " is primitive type"),
@@ -838,7 +781,7 @@ var Expect = /*#__PURE__*/function () {
838
781
  }, {
839
782
  key: "toBeEmpty",
840
783
  value: function toBeEmpty() {
841
- this._expected = true;
784
+ this._satisfied = true;
842
785
  if (!base.isEmpty(this.value)) {
843
786
  throw new TestException({
844
787
  message: "".concat(this.value, " is not empty"),
@@ -851,7 +794,7 @@ var Expect = /*#__PURE__*/function () {
851
794
  }, {
852
795
  key: "notToBeEmpty",
853
796
  value: function notToBeEmpty() {
854
- this._expected = true;
797
+ this._satisfied = true;
855
798
  if (base.isEmpty(this.value)) {
856
799
  throw new TestException({
857
800
  message: "".concat(this.value, " is empty"),
@@ -864,7 +807,7 @@ var Expect = /*#__PURE__*/function () {
864
807
  }, {
865
808
  key: "toBeObject",
866
809
  value: function toBeObject() {
867
- this._expected = true;
810
+ this._satisfied = true;
868
811
  if (!base.isObject(this.value)) {
869
812
  throw new TestException({
870
813
  message: "".concat(this.value, " is not object"),
@@ -877,7 +820,7 @@ var Expect = /*#__PURE__*/function () {
877
820
  }, {
878
821
  key: "notToBeObject",
879
822
  value: function notToBeObject() {
880
- this._expected = true;
823
+ this._satisfied = true;
881
824
  if (base.isObject(this.value)) {
882
825
  throw new TestException({
883
826
  message: "".concat(this.value, " is object"),
@@ -890,7 +833,7 @@ var Expect = /*#__PURE__*/function () {
890
833
  }, {
891
834
  key: "toBeSomeObject",
892
835
  value: function toBeSomeObject() {
893
- this._expected = true;
836
+ this._satisfied = true;
894
837
  if (!base.isSomeObject(this.value)) {
895
838
  throw new TestException({
896
839
  message: "".concat(this.value, " is not some object"),
@@ -903,7 +846,7 @@ var Expect = /*#__PURE__*/function () {
903
846
  }, {
904
847
  key: "notToBeSomeObject",
905
848
  value: function notToBeSomeObject() {
906
- this._expected = true;
849
+ this._satisfied = true;
907
850
  if (base.isSomeObject(this.value)) {
908
851
  throw new TestException({
909
852
  message: "".concat(this.value, " is some object"),
@@ -916,7 +859,7 @@ var Expect = /*#__PURE__*/function () {
916
859
  }, {
917
860
  key: "toBeFunction",
918
861
  value: function toBeFunction() {
919
- this._expected = true;
862
+ this._satisfied = true;
920
863
  if (!base.isFunction(this.value)) {
921
864
  throw new TestException({
922
865
  message: "".concat(this.value, " is not function"),
@@ -929,7 +872,7 @@ var Expect = /*#__PURE__*/function () {
929
872
  }, {
930
873
  key: "notToBeFunction",
931
874
  value: function notToBeFunction() {
932
- this._expected = true;
875
+ this._satisfied = true;
933
876
  if (base.isFunction(this.value)) {
934
877
  throw new TestException({
935
878
  message: "".concat(this.value, " is function"),
@@ -942,7 +885,7 @@ var Expect = /*#__PURE__*/function () {
942
885
  }, {
943
886
  key: "toBeNumeric",
944
887
  value: function toBeNumeric() {
945
- this._expected = true;
888
+ this._satisfied = true;
946
889
  if (!base.isNumeric(this.value)) {
947
890
  throw new TestException({
948
891
  message: "".concat(this.value, " is not numeric"),
@@ -955,7 +898,7 @@ var Expect = /*#__PURE__*/function () {
955
898
  }, {
956
899
  key: "notToBeNumeric",
957
900
  value: function notToBeNumeric() {
958
- this._expected = true;
901
+ this._satisfied = true;
959
902
  if (base.isNumeric(this.value)) {
960
903
  throw new TestException({
961
904
  message: "".concat(this.value, " is numeric"),
@@ -968,7 +911,7 @@ var Expect = /*#__PURE__*/function () {
968
911
  }, {
969
912
  key: "toBeArray",
970
913
  value: function toBeArray() {
971
- this._expected = true;
914
+ this._satisfied = true;
972
915
  if (!base.isArray(this.value)) {
973
916
  throw new TestException({
974
917
  message: "".concat(this.value, " is not array"),
@@ -981,7 +924,7 @@ var Expect = /*#__PURE__*/function () {
981
924
  }, {
982
925
  key: "notToBeArray",
983
926
  value: function notToBeArray() {
984
- this._expected = true;
927
+ this._satisfied = true;
985
928
  if (base.isArray(this.value)) {
986
929
  throw new TestException({
987
930
  message: "".concat(this.value, " is array"),
@@ -994,7 +937,7 @@ var Expect = /*#__PURE__*/function () {
994
937
  }, {
995
938
  key: "toBeSomeArray",
996
939
  value: function toBeSomeArray() {
997
- this._expected = true;
940
+ this._satisfied = true;
998
941
  if (!base.isSomeArray(this.value)) {
999
942
  throw new TestException({
1000
943
  message: "".concat(this.value, " is not some array"),
@@ -1007,7 +950,7 @@ var Expect = /*#__PURE__*/function () {
1007
950
  }, {
1008
951
  key: "notToBeSomeArray",
1009
952
  value: function notToBeSomeArray() {
1010
- this._expected = true;
953
+ this._satisfied = true;
1011
954
  if (!base.isArray(this.value)) {
1012
955
  throw new TestException({
1013
956
  message: "".concat(this.value, " is not array"),
@@ -1027,7 +970,7 @@ var Expect = /*#__PURE__*/function () {
1027
970
  }, {
1028
971
  key: "toBeIterable",
1029
972
  value: function toBeIterable() {
1030
- this._expected = true;
973
+ this._satisfied = true;
1031
974
  if (!base.isIterable(this.value)) {
1032
975
  throw new TestException({
1033
976
  message: "".concat(this.value, " is not iterable"),
@@ -1040,7 +983,7 @@ var Expect = /*#__PURE__*/function () {
1040
983
  }, {
1041
984
  key: "notToBeIterable",
1042
985
  value: function notToBeIterable() {
1043
- this._expected = true;
986
+ this._satisfied = true;
1044
987
  if (base.isIterable(this.value)) {
1045
988
  throw new TestException({
1046
989
  message: "".concat(this.value, " is iterable"),
@@ -1053,7 +996,7 @@ var Expect = /*#__PURE__*/function () {
1053
996
  }, {
1054
997
  key: "toBeSubClassOf",
1055
998
  value: function toBeSubClassOf(type) {
1056
- this._expected = true;
999
+ this._satisfied = true;
1057
1000
  if (!base.isSubClassOf(this.value, type)) {
1058
1001
  throw new TestException({
1059
1002
  message: "".concat(this.value, " is not subclass of ").concat(type),
@@ -1066,7 +1009,7 @@ var Expect = /*#__PURE__*/function () {
1066
1009
  }, {
1067
1010
  key: "notToBeSubClassOf",
1068
1011
  value: function notToBeSubClassOf(type) {
1069
- this._expected = true;
1012
+ this._satisfied = true;
1070
1013
  if (base.isSubClassOf(this.value, type)) {
1071
1014
  throw new TestException({
1072
1015
  message: "".concat(this.value, " is subclass of ").concat(type),
@@ -1079,7 +1022,7 @@ var Expect = /*#__PURE__*/function () {
1079
1022
  }, {
1080
1023
  key: "toBeInstanceOf",
1081
1024
  value: function toBeInstanceOf(type) {
1082
- this._expected = true;
1025
+ this._satisfied = true;
1083
1026
  if (!(this.value instanceof type)) {
1084
1027
  throw new TestException({
1085
1028
  message: "".concat(this.value, " is not instance of ").concat(type),
@@ -1092,7 +1035,7 @@ var Expect = /*#__PURE__*/function () {
1092
1035
  }, {
1093
1036
  key: "notToBeInstanceOf",
1094
1037
  value: function notToBeInstanceOf(type) {
1095
- this._expected = true;
1038
+ this._satisfied = true;
1096
1039
  if (this.value instanceof type) {
1097
1040
  throw new TestException({
1098
1041
  message: "".concat(this.value, " is instance of ").concat(type),
@@ -1105,7 +1048,7 @@ var Expect = /*#__PURE__*/function () {
1105
1048
  }, {
1106
1049
  key: "toMatch",
1107
1050
  value: function toMatch(pattern, flags) {
1108
- this._expected = true;
1051
+ this._satisfied = true;
1109
1052
  var r = new RegExp(pattern, flags);
1110
1053
  if (!r.test(this.value)) {
1111
1054
  throw new TestException({
@@ -1119,7 +1062,7 @@ var Expect = /*#__PURE__*/function () {
1119
1062
  }, {
1120
1063
  key: "notToMatch",
1121
1064
  value: function notToMatch(pattern, flags) {
1122
- this._expected = true;
1065
+ this._satisfied = true;
1123
1066
  var r = new RegExp(pattern, flags);
1124
1067
  if (r.test(this.value)) {
1125
1068
  throw new TestException({
@@ -1133,7 +1076,7 @@ var Expect = /*#__PURE__*/function () {
1133
1076
  }, {
1134
1077
  key: "doesNotMatch",
1135
1078
  value: function doesNotMatch(pattern, flags) {
1136
- this._expected = true;
1079
+ this._satisfied = true;
1137
1080
  var r = new RegExp(pattern, flags);
1138
1081
  if (r.test(this.value)) {
1139
1082
  throw new TestException({
@@ -1147,7 +1090,7 @@ var Expect = /*#__PURE__*/function () {
1147
1090
  }, {
1148
1091
  key: "toBeDefined",
1149
1092
  value: function toBeDefined() {
1150
- this._expected = true;
1093
+ this._satisfied = true;
1151
1094
  if (this.value === undefined) {
1152
1095
  throw new TestException({
1153
1096
  message: "value is undefined",
@@ -1160,7 +1103,7 @@ var Expect = /*#__PURE__*/function () {
1160
1103
  }, {
1161
1104
  key: "notToBeDefined",
1162
1105
  value: function notToBeDefined() {
1163
- this._expected = true;
1106
+ this._satisfied = true;
1164
1107
  if (this.value !== undefined) {
1165
1108
  throw new TestException({
1166
1109
  message: "value is defined",
@@ -1173,7 +1116,7 @@ var Expect = /*#__PURE__*/function () {
1173
1116
  }, {
1174
1117
  key: "toBeUndefined",
1175
1118
  value: function toBeUndefined() {
1176
- this._expected = true;
1119
+ this._satisfied = true;
1177
1120
  if (this.value !== undefined) {
1178
1121
  throw new TestException({
1179
1122
  message: "value is defined",
@@ -1186,7 +1129,7 @@ var Expect = /*#__PURE__*/function () {
1186
1129
  }, {
1187
1130
  key: "notToBeUndefined",
1188
1131
  value: function notToBeUndefined() {
1189
- this._expected = true;
1132
+ this._satisfied = true;
1190
1133
  if (this.value === undefined) {
1191
1134
  throw new TestException({
1192
1135
  message: "value is undefined",
@@ -1199,7 +1142,7 @@ var Expect = /*#__PURE__*/function () {
1199
1142
  }, {
1200
1143
  key: "toBeNull",
1201
1144
  value: function toBeNull() {
1202
- this._expected = true;
1145
+ this._satisfied = true;
1203
1146
  if (this.value !== null) {
1204
1147
  throw new TestException({
1205
1148
  message: "value is not null",
@@ -1212,7 +1155,7 @@ var Expect = /*#__PURE__*/function () {
1212
1155
  }, {
1213
1156
  key: "notToBeNull",
1214
1157
  value: function notToBeNull() {
1215
- this._expected = true;
1158
+ this._satisfied = true;
1216
1159
  if (this.value === null) {
1217
1160
  throw new TestException({
1218
1161
  message: "value is null",
@@ -1225,7 +1168,7 @@ var Expect = /*#__PURE__*/function () {
1225
1168
  }, {
1226
1169
  key: "toBeNullOrUndefined",
1227
1170
  value: function toBeNullOrUndefined() {
1228
- this._expected = true;
1171
+ this._satisfied = true;
1229
1172
  if (this.value == null) ; else {
1230
1173
  throw new TestException({
1231
1174
  message: "value is not null/undefined",
@@ -1238,7 +1181,7 @@ var Expect = /*#__PURE__*/function () {
1238
1181
  }, {
1239
1182
  key: "notToBeNullOrUndefined",
1240
1183
  value: function notToBeNullOrUndefined() {
1241
- this._expected = true;
1184
+ this._satisfied = true;
1242
1185
  if (this.value == null) {
1243
1186
  throw new TestException({
1244
1187
  message: "value is null/undefined",
@@ -1251,7 +1194,7 @@ var Expect = /*#__PURE__*/function () {
1251
1194
  }, {
1252
1195
  key: "toBeEmptyArray",
1253
1196
  value: function toBeEmptyArray() {
1254
- this._expected = true;
1197
+ this._satisfied = true;
1255
1198
  if (base.isSomeArray(this.value)) {
1256
1199
  throw new TestException({
1257
1200
  message: "".concat(this.value, " is some array"),
@@ -1264,7 +1207,7 @@ var Expect = /*#__PURE__*/function () {
1264
1207
  }, {
1265
1208
  key: "toBeValid",
1266
1209
  value: function toBeValid(fnValidation) {
1267
- this._expected = true;
1210
+ this._satisfied = true;
1268
1211
  if (!base.isFunction(fnValidation)) {
1269
1212
  throw new TestException({
1270
1213
  message: "fnValidation is not function",
@@ -1284,7 +1227,7 @@ var Expect = /*#__PURE__*/function () {
1284
1227
  }, {
1285
1228
  key: "notToBeValid",
1286
1229
  value: function notToBeValid(fnValidation) {
1287
- this._expected = true;
1230
+ this._satisfied = true;
1288
1231
  if (!base.isFunction(fnValidation)) {
1289
1232
  throw new TestException({
1290
1233
  message: "fnValidation is not function",
@@ -1306,7 +1249,7 @@ var Expect = /*#__PURE__*/function () {
1306
1249
  value: function toThrow(ex) {
1307
1250
  var shape = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1308
1251
  var strict = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1309
- this._expected = true;
1252
+ this._satisfied = true;
1310
1253
  if (!base.isFunction(this.value)) {
1311
1254
  throw new TestException({
1312
1255
  message: "given argument is not a function.",
@@ -1381,7 +1324,7 @@ var Expect = /*#__PURE__*/function () {
1381
1324
  value: function notToThrow(ex) {
1382
1325
  var shape = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1383
1326
  var strict = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1384
- this._expected = true;
1327
+ this._satisfied = true;
1385
1328
  if (!base.isFunction(this.value)) {
1386
1329
  throw new TestException({
1387
1330
  message: "given argument is not a function.",
@@ -1467,7 +1410,7 @@ var Expect = /*#__PURE__*/function () {
1467
1410
  case 0:
1468
1411
  shape = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
1469
1412
  strict = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
1470
- this._expected = true;
1413
+ this._satisfied = true;
1471
1414
  if (base.isFunction(this.value)) {
1472
1415
  _context.next = 5;
1473
1416
  break;
@@ -1612,7 +1555,7 @@ var Expect = /*#__PURE__*/function () {
1612
1555
  case 0:
1613
1556
  shape = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : false;
1614
1557
  strict = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : false;
1615
- this._expected = true;
1558
+ this._satisfied = true;
1616
1559
  if (base.isFunction(this.value)) {
1617
1560
  _context2.next = 5;
1618
1561
  break;
@@ -1748,7 +1691,7 @@ var Expect = /*#__PURE__*/function () {
1748
1691
  }, {
1749
1692
  key: "toBeTruthy",
1750
1693
  value: function toBeTruthy() {
1751
- this._expected = true;
1694
+ this._satisfied = true;
1752
1695
  if (this.value) ; else {
1753
1696
  throw new TestException({
1754
1697
  message: "".concat(this.value, " is not truthy"),
@@ -1766,7 +1709,7 @@ var Expect = /*#__PURE__*/function () {
1766
1709
  }, {
1767
1710
  key: "toBeFalsy",
1768
1711
  value: function toBeFalsy() {
1769
- this._expected = true;
1712
+ this._satisfied = true;
1770
1713
  if (!this.value) ; else {
1771
1714
  throw new TestException({
1772
1715
  message: "".concat(this.value, " is not falsy"),
@@ -1784,7 +1727,7 @@ var Expect = /*#__PURE__*/function () {
1784
1727
  }, {
1785
1728
  key: "toBeNaN",
1786
1729
  value: function toBeNaN() {
1787
- this._expected = true;
1730
+ this._satisfied = true;
1788
1731
  if (isNaN(this.value)) ; else {
1789
1732
  throw new TestException({
1790
1733
  message: "".concat(this.value, " is not NaN"),
@@ -1797,7 +1740,7 @@ var Expect = /*#__PURE__*/function () {
1797
1740
  }, {
1798
1741
  key: "notToBeNaN",
1799
1742
  value: function notToBeNaN() {
1800
- this._expected = true;
1743
+ this._satisfied = true;
1801
1744
  if (!isNaN(this.value)) ; else {
1802
1745
  throw new TestException({
1803
1746
  message: "".concat(this.value, " is NaN"),
@@ -1823,12 +1766,19 @@ var Test = /*#__PURE__*/function () {
1823
1766
  return new Promise(function (res) {
1824
1767
  var start = new Date();
1825
1768
  if (base.isFunction(_this.fn)) {
1826
- var _expect = new Expect();
1827
- try {
1828
- var _result = _this.fn(function (x) {
1769
+ var expectProvider = function expectProvider(fn) {
1770
+ var expect = function expect(x) {
1829
1771
  _expect.value = x;
1830
1772
  return _expect;
1831
- });
1773
+ };
1774
+ var fnStr = fn.toString();
1775
+ var wrapper = new Function("expect", "\n return function() {\n return (".concat(fnStr, ")();\n };\n "));
1776
+ return wrapper(expect);
1777
+ };
1778
+ var _expect = new Expect();
1779
+ try {
1780
+ var wrappedFn = expectProvider(_this.fn);
1781
+ var _result = wrappedFn();
1832
1782
  if (_result && base.isFunction(_result.then)) {
1833
1783
  _result.then(function (result) {
1834
1784
  res({
@@ -1836,14 +1786,14 @@ var Test = /*#__PURE__*/function () {
1836
1786
  test: _this.name,
1837
1787
  result: result,
1838
1788
  time: new Date() - start,
1839
- expected: _expect.expected
1789
+ satisfied: _expect.satisfied
1840
1790
  });
1841
1791
  })["catch"](function (ex) {
1842
1792
  res({
1843
1793
  success: false,
1844
1794
  test: _this.name,
1845
1795
  time: new Date() - start,
1846
- expected: _expect.expected,
1796
+ satisfied: _expect.satisfied,
1847
1797
  err: new TestException({
1848
1798
  message: "test '".concat(_this.name, "' failed."),
1849
1799
  code: 501,
@@ -1858,7 +1808,7 @@ var Test = /*#__PURE__*/function () {
1858
1808
  test: _this.name,
1859
1809
  time: new Date() - start,
1860
1810
  result: _result,
1861
- expected: _expect.expected
1811
+ satisfied: _expect.satisfied
1862
1812
  });
1863
1813
  }
1864
1814
  } catch (ex) {
@@ -1866,7 +1816,7 @@ var Test = /*#__PURE__*/function () {
1866
1816
  success: false,
1867
1817
  test: _this.name,
1868
1818
  time: new Date() - start,
1869
- expected: _expect.expected,
1819
+ satisfied: _expect.satisfied,
1870
1820
  err: new TestException({
1871
1821
  message: "test '".concat(_this.name, "' failed."),
1872
1822
  code: 501,
@@ -1919,7 +1869,7 @@ var TestRunner = /*#__PURE__*/function () {
1919
1869
  key: "_runSingle",
1920
1870
  value: function () {
1921
1871
  var _runSingle2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(test, onProgress, i) {
1922
- var tr;
1872
+ var testType, tr;
1923
1873
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1924
1874
  while (1) switch (_context.prev = _context.next) {
1925
1875
  case 0:
@@ -1943,7 +1893,7 @@ var TestRunner = /*#__PURE__*/function () {
1943
1893
  });
1944
1894
  }
1945
1895
  }
1946
- if (test instanceof Test) {
1896
+ if (!(test == null)) {
1947
1897
  _context.next = 6;
1948
1898
  break;
1949
1899
  }
@@ -1951,33 +1901,50 @@ var TestRunner = /*#__PURE__*/function () {
1951
1901
  this._errors.push({
1952
1902
  index: i,
1953
1903
  err: new TestException({
1954
- message: "Given test is not an instance of '@locustjs/test:Test' class.",
1904
+ message: "No test was given.",
1905
+ code: 1505,
1906
+ status: "no-test"
1907
+ })
1908
+ });
1909
+ _context.next = 17;
1910
+ break;
1911
+ case 6:
1912
+ if (test instanceof Test) {
1913
+ _context.next = 12;
1914
+ break;
1915
+ }
1916
+ this._unknown++;
1917
+ testType = base.typename(test);
1918
+ this._errors.push({
1919
+ index: i,
1920
+ err: new TestException({
1921
+ message: "Given test is '".concat(testType, "'. Expected a function or an instance of '@locustjs/test:Test' class."),
1955
1922
  code: 1504,
1956
1923
  status: "invalid-test"
1957
1924
  })
1958
1925
  });
1959
- _context.next = 11;
1926
+ _context.next = 17;
1960
1927
  break;
1961
- case 6:
1962
- _context.next = 8;
1928
+ case 12:
1929
+ _context.next = 14;
1963
1930
  return test.run();
1964
- case 8:
1931
+ case 14:
1965
1932
  tr = _context.sent;
1966
1933
  this._results.push(tr);
1967
1934
  if (base.isObject(tr.err)) {
1968
- if (!tr.expected) {
1935
+ if (!tr.satisfied) {
1969
1936
  this._faulted++;
1970
1937
  } else {
1971
1938
  this._failed++;
1972
1939
  }
1973
- } else if (!tr.expected) {
1940
+ } else if (!tr.satisfied) {
1974
1941
  this._unknown++;
1975
1942
  } else if (tr.success) {
1976
1943
  this._passed++;
1977
1944
  } else {
1978
1945
  this._failed++;
1979
1946
  }
1980
- case 11:
1947
+ case 17:
1981
1948
  case "end":
1982
1949
  return _context.stop();
1983
1950
  }
@@ -2010,18 +1977,33 @@ var TestRunner = /*#__PURE__*/function () {
2010
1977
  tests = [tests];
2011
1978
  }
2012
1979
  if (base.isArray(tests)) {
2013
- var _tests = tests.map(function (test) {
1980
+ var prs = tests.map(function (test, i) {
2014
1981
  var _test = test;
2015
1982
  if (base.isArray(test)) {
2016
- if (test.length == 2) {
2017
- _test = new Test(test[0], test[1]);
1983
+ if (test.length == 2 && base.isString(test[0])) {
1984
+ if (base.isFunction(test[1])) {
1985
+ _test = new Test(test[0], test[1]);
1986
+ } else if (test[1] instanceof Test) {
1987
+ _test = test[1];
1988
+ if (base.isEmpty(_test.name)) {
1989
+ _test.name = test[0];
1990
+ }
1991
+ } else {
1992
+ _test = test[1];
1993
+ }
1994
+ } else if (test.length == 1) {
1995
+ if (test[0] instanceof Test) {
1996
+ _test = test[0];
1997
+ } else if (base.isFunction(test[0])) {
1998
+ _test = new Test("nonamed test " + i, test[0]);
1999
+ }
2018
2000
  }
2019
2001
  }
2020
2002
  return _test;
2021
2003
  }).map(function (test, i) {
2022
2004
  return _this._runSingle(test, onProgress, i);
2023
2005
  });
2024
- Promise.all(_tests).then(function (_) {
2006
+ Promise.all(prs).then(function (_) {
2025
2007
  return res(_this.result);
2026
2008
  })["catch"](function (ex) {
2027
2009
  _this._errors.push({
@@ -2077,7 +2059,7 @@ var TestRunner = /*#__PURE__*/function () {
2077
2059
  return "\t".concat(i == err.length - 1 ? "".concat(fgYellow) : "".concat(fgGray, "error ").concat(testResult.err.code, ": ")).concat(msg).concat(reset);
2078
2060
  }).join("\n");
2079
2061
  if (base.isObject(testResult.err)) {
2080
- if (!testResult.expected) {
2062
+ if (!testResult.satisfied) {
2081
2063
  message += "".concat(bright).concat(fgWhite).concat(testResult.test, ": ").concat(fgYellow, "faulted").concat(reset, " ").concat(t);
2082
2064
  message += "\n";
2083
2065
  message += "".concat(fgGray).concat(err, " ").concat(reset);
@@ -2086,7 +2068,7 @@ var TestRunner = /*#__PURE__*/function () {
2086
2068
  message += "\n";
2087
2069
  message += "".concat(fgGray).concat(err, " ").concat(reset);
2088
2070
  }
2089
- } else if (!testResult.expected) {
2071
+ } else if (!testResult.satisfied) {
2090
2072
  message += "".concat(bright).concat(fgWhite).concat(testResult.test, ": ").concat(fgMagenta, "expect not used").concat(reset, " ").concat(t);
2091
2073
  if (testResult.err) {
2092
2074
  message += "\n";
@@ -2107,14 +2089,18 @@ var TestRunner = /*#__PURE__*/function () {
2107
2089
  _loop();
2108
2090
  }
2109
2091
  if (detailed && this._errors.length) {
2110
- console.log("Errors:");
2092
+ console.log("\nErrors:");
2111
2093
  var _iterator = _createForOfIteratorHelper(this._errors),
2112
2094
  _step;
2113
2095
  try {
2114
2096
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
2115
2097
  var error = _step.value;
2116
2098
  if (error.index !== undefined) {
2117
- console.log("".concat(error.index, ". ").concat(error.test, ": ").concat(error.err.innerException.toString()));
2099
+ if (error.err.innerException) {
2100
+ console.log("".concat(error.index, ". ").concat(error.test, ": ").concat(error.err.innerException.toString()));
2101
+ } else {
2102
+ console.log("".concat(error.index, ". ").concat(error.err.status, ": ").concat(error.err.message));
2103
+ }
2118
2104
  } else {
2119
2105
  console.log("".concat(error.err.toString()));
2120
2106
  }
@@ -2175,7 +2161,13 @@ var TestRunner = /*#__PURE__*/function () {
2175
2161
  t = i < 0 || _args2.length <= i ? undefined : _args2[i];
2176
2162
  if (i != _args2.length - 1 || !base.isBool(t)) {
2177
2163
  if (base.isIterable(t)) {
2178
- _tests = [].concat(_toConsumableArray(_tests), _toConsumableArray(t));
2164
+ if (base.isArray(t) && t.length == 2 && base.isString(t[0]) && (base.isFunction(t[1]) || t[1] instanceof Test)) {
2165
+ _tests.push(t);
2166
+ } else {
2167
+ _tests.push.apply(_tests, _toConsumableArray(t));
2168
+ }
2169
+ } else {
2170
+ _tests.push(["test " + i, t]);
2179
2171
  }
2180
2172
  }
2181
2173
  }