Skip to content

Dev env questions #4

@schoettl

Description

@schoettl

Can a clojure developer help me with a few things?

1

How do you compare lein test output?

FAIL in (timestamp) (parser_test.cljc:261)
date timestamp with day and time with seconds
expected: (= [:timestamp [:timestamp-active [:timestamp-inner [:timestamp-inner-w-time [:ts-date "2020-01-18"] [:ts-day "Sat"] [:ts-time "12:00:00"] [:ts-modifiers]]]]] (parse "<2020-01-18 Sat 12:00:00>"))
  actual: (not (= [:timestamp [:timestamp-active [:timestamp-inner [:timestamp-inner-w-time [:ts-date "2020-01-18"] [:ts-day "Sat"] [:ts-time "12:00:00"] [:ts-modifiers]]]]] [:timestamp [:timestamp-active [:timestamp-inner [:timestamp-inner-w-time [:ts-date "2020-01-18"] [:ts-day "Sat"] [:ts-time "12:00:00"]] [:ts-modifiers]]]]))

Is there a lein test diff tool to get around copy & paste?

2

(deftest timestamp
  (let [parse #(parser/org % :start :timestamp)]
    (testing "date-only timestamp"
      (is (= [:timestamp [:timestamp-active [:timestamp-inner [:timestamp-inner-wo-time [:ts-date "2020-01-18"]] [:ts-modifiers]]]]
             (parse "<2020-01-18>"))))

How can I def a helper function that creates this huge [:timestamp [...?

3

Can I speed up the tests by running them in lein repl instead of lein test. lein test already takes 5.5 seconds to run, not funny...

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions