lambdaisland / chui Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 1.0
License: Eclipse Public License 1.0
When cljs.core.async.interop/<p!
is used inside the test results are shown immediately as "Pass" while the test is still in progress. And when an error occurs nothing is updated on UI: "Running" and "Pass" are shown forever
(deftest some-async-test
(testing "Some async test should fail"
(async done
(cljs.core.async/go
(cljs.core.async.interop/<p! (returns-promise)) ; error occurs here
(is (= false true)) ; never executed
(done))))))
It's common to have the editor and the browser (with the test tab open) positioned side-by-side on the screen. But the current chui-ui is not responsive, e.g. what about when the browser viewport width is small, it just hides the list of test runs, since most of the time people only care about the last run. Or it could provide a button to manually hide a column.
Hi,
in the test output the funnel-client/whoami is included as part of a test's id.
it would be useful to be able to set the whoami to a fixed name, so that the test id's are constant over time. this allows tools that show what commit caused a test to fail. stats about flaky tests etc.
For whatever reason, my cljs tests that use (is (match? ,,,))
from nubank/matcher-combinators are blowing up in Safari 15.6.1 with the error TypeError: re-find must match against a string.
It looks like the issue is an unexpected nil at https://github.com/lambdaisland/chui/blob/main/modules/chui-core/src/lambdaisland/chui/runner.cljs#L93-L94. My quick logging check on the erroring tests was giving me a value for line-col
of "@"
.
It seems to me this is imperfect and likely to be revisited when conditions change in cljs.test.
Can I propose the following patch? If so, I'll make up a PR. Test line/col reporting remains broken (as it is now). But least it will get us to actionable test failures on Safari:
diff --git a/modules/chui-core/src/lambdaisland/chui/runner.cljs b/modules/chui-core/src/lambdaisland/chui/runner.cljs
index c3d9575..af1c89f 100644
--- a/modules/chui-core/src/lambdaisland/chui/runner.cljs
+++ b/modules/chui-core/src/lambdaisland/chui/runner.cljs
@@ -90,8 +90,8 @@
(let [line-col (drop (- (count frame) 2) frame)
file (str/join ":" (take (- (count frame) 2) frame))]
{:file file
- :line (js/parseInt (re-find #"\d+" (first line-col)) 10)
- :column (js/parseInt (re-find #"\d+" (second line-col)) 10)})))))
+ :line (js/parseInt (re-find #"\d+" (str (first line-col))) 10)
+ :column (js/parseInt (re-find #"\d+" (str (second line-col))) 10)})))))
(defmulti report :type)
(defmethod report :default [_])
After upgrading to Clojurescript version 1.10.844, we started seeing this error when loading the browser runner in chui-shadow
:
Failed to load lambdaisland/chui/shadow/browser_runner.cljs TypeError: G__52095.addHandler is not a function
cljs$core$IFn$_invoke$arity$2 glogi.cljs:134
cljs$core$IFn$_invoke$arity$2 glogi.cljs:156
cljs$core$IFn$_invoke$arity$1 glogi.cljs:151
lambdaisland$glogi$console$install_BANG_ console.cljs:81
Bumping glogi to to 1.0.100 as suggested here lambdaisland/glogi#10 solved the issue for us.
$ clojure -Abrowser-test -Stree
lambdaisland/chui-shadow 1.0.173
. lambdaisland/chui-ui 1.0.173
. lambdaisland/chui-core 1.0.173
X lambdaisland/glogi 1.0.70 :use-top
lambdaisland/glogi 1.0.100
Happy to make a PR to bump the glogi dependency in chui if you think it's a good idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.