squint

rafaeldelboni 2025-06-12T15:02:28.105799Z

Async testing with vitest + squint is a breeze, thank you for all you work on Squint. I really wish we had nrepl on it, would be the perfect frontend development experience.

🚀 4
rafaeldelboni 2025-06-12T15:03:36.348659Z

For anyone curious for the ergonomics without any wrapper:

(ns core-test
  (:require ["vitest" :refer [describe expect test]]))

(describe "core"
  (fn []
    (test "dummy expect works"
      (fn []
        (. (expect 1) (toBe 1))))

    (test "dummy async expect works"
      (^:async fn []
        (let [promise-fn (new js/Promise
                              (fn [resolve] (js/setTimeout #(resolve 2) 100)))
              result (js-await promise-fn)]
          (. (expect result) (toBe 2)))))))

1
borkdude 2025-06-12T15:41:08.422419Z

Nice! Yeah I should really spend more time on nREPL

❤️ 1