hyperfiddle / hyperfiddle/rcf

Test generation breaks REPL-like experience

Open
#31 4 comments 0 reactions 1 assignee View on GitHub

@ggeoffrey is already working on this.

Since Sep 30, 2021.

bug
Dominant language
Clojure
Stars
301
Forks
14
PR merge metrics
No merged PRs in 30d

Description

In Clojure, setting *generate-tests* to true will cause RCF to emit clojure.test/deftest forms.
deftest always return nil.

In RCF, it should return the last LHS of body.

(alter-var-root #'hyperfiddle.rcf/*generate-tests* (constantly true))
(alter-var-root #'hyperfiddle.rcf/*enabled* (constantly true))

(ns foo)
(tests 1 := 1) 
;; ✅ 
;; => 1

(clojure.test/run-tests 'foo)
;; ✅
Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
{:test 1, :pass 1, :fail 0, :error 0, :type :summary}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.