mol_time_all 1.1.534 → 1.1.535
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 +11 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +11 -1
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -655,6 +655,16 @@ var $;
|
|
|
655
655
|
;
|
|
656
656
|
"use strict";
|
|
657
657
|
var $;
|
|
658
|
+
(function ($) {
|
|
659
|
+
function $mol_promise_like(val) {
|
|
660
|
+
return val && typeof val.then === 'function';
|
|
661
|
+
}
|
|
662
|
+
$.$mol_promise_like = $mol_promise_like;
|
|
663
|
+
})($ || ($ = {}));
|
|
664
|
+
//mol/promise/like/like.ts
|
|
665
|
+
;
|
|
666
|
+
"use strict";
|
|
667
|
+
var $;
|
|
658
668
|
(function ($) {
|
|
659
669
|
function $mol_fail_hidden(error) {
|
|
660
670
|
throw error;
|
|
@@ -683,7 +693,7 @@ var $;
|
|
|
683
693
|
for (let mock of $_1.$mol_test_mocks)
|
|
684
694
|
await mock(context);
|
|
685
695
|
const res = test(context);
|
|
686
|
-
if (res
|
|
696
|
+
if ($mol_promise_like(res)) {
|
|
687
697
|
await new Promise((done, fail) => {
|
|
688
698
|
res.then(done, fail);
|
|
689
699
|
setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);
|