This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-01
Channels
- # admin-announcements (1)
- # aws (1)
- # beginners (14)
- # boot (19)
- # cljs-dev (10)
- # cljsrn (2)
- # clojure (64)
- # clojure-android (4)
- # clojure-dev (5)
- # clojure-greece (7)
- # clojure-italy (10)
- # clojure-russia (42)
- # clojure-spec (117)
- # clojure-uk (78)
- # clojurescript (160)
- # cloverage (1)
- # conf-proposals (1)
- # cursive (8)
- # datomic (93)
- # editors (8)
- # editors-rus (5)
- # figwheel (1)
- # flambo (14)
- # hoplon (95)
- # jobs (2)
- # jobs-rus (1)
- # lambdaisland (4)
- # lein-figwheel (6)
- # leiningen (3)
- # om (106)
- # onyx (33)
- # planck (6)
- # proton (3)
- # protorepl (2)
- # random (2)
- # re-frame (9)
- # reagent (5)
- # ring (1)
- # untangled (61)
- # yada (50)
Hey, so I have the following test that is failing for PhantomJS and Nashorn, but works fine for Safari, Firefox, Chrome, and SlimerJS:
(ns debug.promise-test
(:require [cljs.test :refer-macros [is testing async deftest]])
(:import [goog Promise]))
(deftest promise-test
(testing "Can pull a value out of a Promise"
(async done
(-> (new Promise (fn [resolve] (resolve 1)))
(.then (fn [val]
(is (= 1 val))
(done)))))))
This just hangs on PhantomJS and Nashorn.
Is this a known thing?I came at this bug playing with polyfills, but I'm giving you guys the minimal thing to reproduce the problem
The only reason for bothering with Promises is because I'm trying to wrap crypto.subtle
, which handles everything in Promises. I want to fall-back to synchronous JS implementations and a polyfilled Promise-facade if that API isn't available.
It's probably a bug in goog.Promise
- maybe the right thing to do is to drop it and use core.async
channels?