Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Test vars in cli #38

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Test vars in cli #38

wants to merge 10 commits into from

Conversation

mourjo
Copy link

@mourjo mourjo commented May 3, 2020

Mainly for running individual tests from the commandline #2

Some additional fixes:

  • Uniquify and sort nses and vars to test
  • Ensure test counts are not off with test-ns-hook
  • When vars or namespaces are not found do not throw error, test the other stuff if any
  • Additional project to test selectors
  • When a test calls another test, fixtures were run in Circleci but not in Leiningen or Clojure
  • When a test is run from within test-ns-hook, Leiningen does not run fixtures, but Circleci does
  • When there is a test-ns-hook, ensure only selected vars are tested

Mourjo Sen added 10 commits May 1, 2020 18:20
This behaviour is the same as with Leiningen's test selectors.
When tests are run via test-ns-hook, clojure.test calls:
      (do-report {:type :begin-test-var, :var v})
      (inc-report-counter :test)

Which for circleci.test reports means that the test counter is
incremented twice.
This behaviour is similar to Leiningen and Clojure test where if a
test calls another test, the once and each fixtures are called only
once.
This is in accordance with clojure.test's definition of fixtures and
test-ns-hook:
   Note: Fixtures and test-ns-hook are mutually incompatible.  If you
   are using test-ns-hook, fixture functions will *never* be run.

Global fixtures still run.
@mourjo mourjo force-pushed the test-vars-in-cli branch from 78226f1 to 999bd2b Compare May 4, 2020 03:11
@mourjo
Copy link
Author

mourjo commented Jul 10, 2020

Any update on this? 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant