                              (t/is (instance? js/Error v))
                              (t/is (p/rejected? p1))
                              (done))))))
-
-(t/deftest timeout-with-finally
-  (t/async done
-    (let [p1 (-> (p/delay 300 1)
-                 (p/timeout 200 1))]
-      (-> p1
-          (p/catch #(t/is (instance? js/Error %)))
-          (p/finally (fn [v]
-                       (t/is (= v nil))
-                       (done)))))))
-
-(t/deftest rejected-promise
-  (t/async done
-    (let [p1 (p/rejected 1)]
-      (t/is (p/rejected? p1))
-      (p/catch p1 (fn [v]
-                    (t/is (= v 1))
-                    (done))))))
 
 (t/deftest promise-as-functor
   (t/async done

                   (t/is (= v 3))
                   (done))))))


(t/deftest promisify
  (t/async done
    (let [func1 (fn [x cb] (cb (inc x)))


(enable-console-print!)

(t/deftest promise-from-value
  (let [p1 (p/promise 1)]
    (t/is (p/fulfilled? p1))
    (t/is (= (m/extract p1) 1))))

(t/deftest promise-from-factory
  (let [p1 (p/promise (fn [resolve] (resolve 1)))]
    (t/is (p/fulfilled? p1))
    (t/is (= (m/extract p1) 1))))

(t/deftest promise-async-factory
  (t/async done
    (let [p1 (p/promise (fn [resolve]
                          (js/setTimeout (partial resolve 1) 0)))]
