mol_regexp 0.0.708 → 0.0.709

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/node.test.js CHANGED
@@ -340,6 +340,16 @@ var $;
340
340
  ;
341
341
  "use strict";
342
342
  var $;
343
+ (function ($) {
344
+ function $mol_promise_like(val) {
345
+ return val && typeof val.then === 'function';
346
+ }
347
+ $.$mol_promise_like = $mol_promise_like;
348
+ })($ || ($ = {}));
349
+ //mol/promise/like/like.ts
350
+ ;
351
+ "use strict";
352
+ var $;
343
353
  (function ($) {
344
354
  function $mol_fail_hidden(error) {
345
355
  throw error;
@@ -368,7 +378,7 @@ var $;
368
378
  for (let mock of $_1.$mol_test_mocks)
369
379
  await mock(context);
370
380
  const res = test(context);
371
- if (res instanceof Promise) {
381
+ if ($mol_promise_like(res)) {
372
382
  await new Promise((done, fail) => {
373
383
  res.then(done, fail);
374
384
  setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);