make-test-name

circumspec.test

  • (make-test-name s)
Make a legal test name: Convert whitespace, /, . to dashes. Append
-test if collides with name of the thing itself

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source circumspec/test.clj:8 top

(defn make-test-name
  "Make a legal test name: Convert whitespace, /, . to dashes. Append
   -test if collides with name of the thing itself"
  [s]
  (let [basename (re-gsub #"\s+|/|\." "-" s)]
    (if (and (resolve (symbol basename))
             (not (.endsWith basename "-test")))
      (str basename "-test")
      basename)))
Vars in circumspec.test/make-test-name: and defn let not resolve str symbol
Used in 0 other vars

Comments top

No comments for make-test-name. Log in to add a comment.