                              (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 (= (m/extract p1)  1))
                   (done))))))

(t/deftest spread-all-chain
  (let [p1 (-> (p/all [(p/promise 1) (p/promise 2)])
               (p/spread (fn [x y]
                           (t/is (= x 1))
                           (t/is (= y 2))
                           (+ x y))))]
    (p/then p1 (fn [v]
                 (t/is (= v 3))))))

(t/deftest any-with-delay-chain
  (t/async done
    (let [p1 (p/any [(p/delay 300 1) (p/delay 200 2)])]
      (p/then p1 (fn [v]
                   (t/is (= v 2))
                   (done))))))

(t/deftest any-with-timeout-catch
  (t/async done
    (let [p1 (-> (p/delay 300 1)
                 (p/timeout 200))]

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

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