mol_data_all 1.1.653 → 1.1.655

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
@@ -575,6 +575,16 @@ var $;
575
575
  ;
576
576
  "use strict";
577
577
  var $;
578
+ (function ($) {
579
+ function $mol_promise_like(val) {
580
+ return val && typeof val.then === 'function';
581
+ }
582
+ $.$mol_promise_like = $mol_promise_like;
583
+ })($ || ($ = {}));
584
+ //mol/promise/like/like.ts
585
+ ;
586
+ "use strict";
587
+ var $;
578
588
  (function ($_1) {
579
589
  function $mol_test(set) {
580
590
  for (let name in set) {
@@ -593,7 +603,7 @@ var $;
593
603
  for (let mock of $_1.$mol_test_mocks)
594
604
  await mock(context);
595
605
  const res = test(context);
596
- if (res instanceof Promise) {
606
+ if ($mol_promise_like(res)) {
597
607
  await new Promise((done, fail) => {
598
608
  res.then(done, fail);
599
609
  setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);