   #?(:cljs
      (t/async done
        (let [e (ex-info "foobar" {})
-             p1 (future-fail 200 e)
+             p1 (future-fail 100 e)
              p2 (p/branch p1 (constantly nil) identity)]
          (p/then p2 #(do
                        (t/is (= % e))
                        (done)))))
      :clj
      (let [e (ex-info "foobar" {})
-           p1 (future-fail 200 e)
+           p1 (future-fail 100 e)
            p2 (p/branch p1 (constantly nil) (constantly 1))]
        (t/is (= @p2 1)))))
 

  #?(:cljs
     (t/async done
       (let [p1 (p/promise (fn [resolve reject]
                             (p/schedule 100 #(resolve 1))))]
         (t/is (p/pending? p1))
         (p/then p1 (fn [v]
                      (t/is (= v 1))
                      (done)))))
     :clj
     (let [p1 (p/promise (fn [resolve reject]
                           (p/schedule 100 #(resolve 1))))]
       (t/is (p/pending? p1))
       (t/is (= @p1 1)))))


(t/deftest chaining-using-map
  #?(:cljs
     (t/async done
       (let [p1 (future-ok 100 2)
             p2 (p/map inc p1)
             p3 (p/map inc p2)]
         (p/then p3 (fn [v]
                      (t/is (= v 4))
                      (done)))))
     :clj
     (let [p1 (future-ok 100 2)
           p2 (p/map inc p1)
           p3 (p/map inc p2)]
       (t/is (= @p3 4)))))
