mol_compare_deep 0.0.1154 → 0.0.1156
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 +15 -12
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -2711,17 +2711,20 @@ var $;
|
|
|
2711
2711
|
"use strict";
|
|
2712
2712
|
var $;
|
|
2713
2713
|
(function ($) {
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
done
|
|
2719
|
-
fail
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2714
|
+
class $mol_promise extends Promise {
|
|
2715
|
+
done;
|
|
2716
|
+
fail;
|
|
2717
|
+
constructor(executor) {
|
|
2718
|
+
let done;
|
|
2719
|
+
let fail;
|
|
2720
|
+
super((d, f) => {
|
|
2721
|
+
done = d;
|
|
2722
|
+
fail = f;
|
|
2723
|
+
executor?.(d, f);
|
|
2724
|
+
});
|
|
2725
|
+
this.done = done;
|
|
2726
|
+
this.fail = fail;
|
|
2727
|
+
}
|
|
2725
2728
|
}
|
|
2726
2729
|
$.$mol_promise = $mol_promise;
|
|
2727
2730
|
})($ || ($ = {}));
|
|
@@ -2823,7 +2826,7 @@ var $;
|
|
|
2823
2826
|
var $;
|
|
2824
2827
|
(function ($) {
|
|
2825
2828
|
function $mol_wait_timeout_async(timeout) {
|
|
2826
|
-
const promise = $mol_promise();
|
|
2829
|
+
const promise = new $mol_promise();
|
|
2827
2830
|
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
2828
2831
|
return Object.assign(promise, {
|
|
2829
2832
|
destructor: () => task.destructor()
|