{"id":15062809,"url":"https://github.com/fulcrologic/fulcro-spec","last_synced_at":"2025-08-21T12:30:53.736Z","repository":{"id":52921450,"uuid":"97036547","full_name":"fulcrologic/fulcro-spec","owner":"fulcrologic","description":"A library that wraps clojure.test for a better BDD testing experience.","archived":false,"fork":false,"pushed_at":"2023-04-04T14:31:27.000Z","size":730,"stargazers_count":40,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-15T02:14:06.266Z","etag":null,"topics":["clojure","clojurescript","testing","testing-framework"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fulcrologic.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-12T17:45:27.000Z","updated_at":"2024-01-21T02:48:53.000Z","dependencies_parsed_at":"2024-09-24T23:46:59.479Z","dependency_job_id":"ef47bf94-fe66-475a-a7da-9d63ae26cd41","html_url":"https://github.com/fulcrologic/fulcro-spec","commit_stats":{"total_commits":566,"total_committers":16,"mean_commits":35.375,"dds":0.5212014134275618,"last_synced_commit":"3168df0045cebe5ec32c73f76051b5b9b8ec4fb8"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrologic%2Ffulcro-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrologic%2Ffulcro-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrologic%2Ffulcro-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulcrologic%2Ffulcro-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulcrologic","download_url":"https://codeload.github.com/fulcrologic/fulcro-spec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229915631,"owners_count":18144014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","testing","testing-framework"],"created_at":"2024-09-24T23:46:51.137Z","updated_at":"2024-12-19T23:15:20.684Z","avatar_url":"https://github.com/fulcrologic.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"= fulcro-spec\n:source-highlighter: coderay\n:source-language: clojure\n:toc:\n:toc-placement: preamble\n:sectlinks:\n:sectanchors:\n:sectnums:\n\nifdef::env-github[]\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\nendif::[]\n\n== CHANGE OF SCOPE NOTICE\n\n**BREAKING CHANGES** as of 3.1.  The `=throws=\u003e` clause now just takes either a type\nor a regex. Not maps/lists.\n\n**BREAKING CHANGES** as of 3.0. Do NOT upgrade without being prepared to port your\ntest runners.\n\nIMPORTANT: This library no longer contains browser-based runners.\n\nI recommend the following alternatives:\n\nClojure Tests:: I recommend IntelliJ/Emacs/Vim in-editor testing, or perhaps\nClojure Tools Deps with kaocha. The latter renders into a terminal, but can use fulcro-spec's\nmacros. Here is a sample config file that will use Fulcro spec's terminal reporting:\n\n[source, clojure]\n-----\n#kaocha/v1\n    {:tests    [{:id           :unit\n                 :ns-patterns  [\"-test$\" \"-spec$\"]\n                 :test-paths   [\"src/test\"]\n                 :skip-meta    [:integration]\n                 :source-paths [\"src/main\"]}]\n     :reporter [fulcro-spec.reporters.terminal/fulcro-report]\n     :plugins  [:kaocha.plugin/randomize\n                :kaocha.plugin/filter\n                :kaocha.plugin/capture-output]}\n-----\n\nClojurescript Tests:: I highly recommend using Nubank's Workspaces.  I've contributed a\nshadow-cljs target that can auto-scan for tests if you use their deftest macro. Again, things\nlike the `provided` macro work within Workspaces.  I recommend using shadow-cljs\n`:karma` target for running CI tests.\n\nSee https://github.com/fulcrologic/fulcro-spec/blob/main/docs/index.adoc[the docs] for more details.\n\n== Description\n\nA Clojure(scipt) testing library to augment the standard `clojure.test`.\n\nimage:https://img.shields.io/clojars/v/fulcrologic/fulcro-spec.svg[link=\"https://clojars.org/fulcrologic/fulcro-spec\"]\n\nRelease: image:https://circleci.com/gh/fulcrologic/fulcro-spec/tree/main.svg?style=svg[\"CircleCI\", link=\"https://circleci.com/gh/fulcrologic/fulcro-spec/tree/main\"]\n\n== NEW!  REPL Runner\n\nIt is common to want to run tests in the REPL, but the output of the default runner leaves a lot to be desired.  If\nyou're using IntelliJ you can now add something like this to your REPL commands (and hook it to a keyboard shortcut) for a much\nbetter testing experience:\n\nRun Tests with a `:focus` metadata marker (selector):\n\n```\n(in-ns (.getName *ns*))\n(require 'fulcro-spec.reporters.repl)\n(fulcro-spec.reporters.repl/run-tests #(:focus (meta %)))\n```\n\nRun all tests:\n\n```\n(in-ns (.getName *ns*))\n(require 'fulcro-spec.reporters.repl)\n(fulcro-spec.reporters.repl/run-tests)\n```\n\nNOTE: Be sure to check \"Before Executing\" -\u003e \"Load File\" on the REPL command.\n\n== Usage\n\n[source, clojure]\n-----\n(ns my-test\n  (:require\n    [fulcro-spec.core :refer [when-mocking provided assertions]\n    [clojure.test :refer [deftest]]\n    ...))\n\n(defn f [x] 900)\n(defn g [y] (+ y (f y)))\n\n(deftest my-test\n  (when-mocking\n    (f x) =\u003e 22\n\n    (assertions\n      \"mocking works\"\n      (g 9) =\u003e 31)))\n-----\n\nSee the full documentation for complete details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulcrologic%2Ffulcro-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulcrologic%2Ffulcro-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulcrologic%2Ffulcro-spec/lists"}