mol_db 0.0.605 → 0.0.607

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
@@ -1049,6 +1049,16 @@ var $;
1049
1049
  ;
1050
1050
  "use strict";
1051
1051
  var $;
1052
+ (function ($) {
1053
+ function $mol_promise_like(val) {
1054
+ return val && typeof val.then === 'function';
1055
+ }
1056
+ $.$mol_promise_like = $mol_promise_like;
1057
+ })($ || ($ = {}));
1058
+ //mol/promise/like/like.ts
1059
+ ;
1060
+ "use strict";
1061
+ var $;
1052
1062
  (function ($_1) {
1053
1063
  function $mol_test(set) {
1054
1064
  for (let name in set) {
@@ -1067,7 +1077,7 @@ var $;
1067
1077
  for (let mock of $_1.$mol_test_mocks)
1068
1078
  await mock(context);
1069
1079
  const res = test(context);
1070
- if (res instanceof Promise) {
1080
+ if ($mol_promise_like(res)) {
1071
1081
  await new Promise((done, fail) => {
1072
1082
  res.then(done, fail);
1073
1083
  setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);