{"id":20733818,"url":"https://github.com/nubank/emidje","last_synced_at":"2025-10-07T02:12:00.957Z","repository":{"id":71062155,"uuid":"130512382","full_name":"nubank/emidje","owner":"nubank","description":"Test runner, report viewer and formatting tool for Midje within Emacs ","archived":false,"fork":false,"pushed_at":"2024-07-12T19:59:02.000Z","size":313,"stargazers_count":26,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T18:50:54.556Z","etag":null,"topics":["cider","clojure","emacs","midje"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nubank.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2018-04-21T21:12:02.000Z","updated_at":"2024-07-05T00:04:56.000Z","dependencies_parsed_at":"2025-04-23T23:00:37.107Z","dependency_job_id":"0c2f3d30-c985-4f5c-8c50-c874b0128b37","html_url":"https://github.com/nubank/emidje","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nubank/emidje","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nubank%2Femidje","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nubank%2Femidje/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nubank%2Femidje/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nubank%2Femidje/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nubank","download_url":"https://codeload.github.com/nubank/emidje/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nubank%2Femidje/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708004,"owners_count":26031932,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cider","clojure","emacs","midje"],"created_at":"2024-11-17T05:27:18.227Z","updated_at":"2025-10-07T02:12:00.909Z","avatar_url":"https://github.com/nubank.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emidje\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![MELPA](https://melpa.org/packages/emidje-badge.svg)](https://melpa.org/#/emidje)\n[![MELPA\nStable](https://stable.melpa.org/packages/emidje-badge.svg)](https://stable.melpa.org/#/emidje)\n[![Build\nstatus](https://circleci.com/gh/nubank/emidje.svg?style=svg)](https://circleci.com/gh/nubank/emidje)\n\nTest runner, report viewer and formatting tool for Midje within Emacs.\n\n`Emidje` extends [Cider][cider] to provide support for [Midje][midje] tests in a\nsimilar fashion as\n[cider-test.el](https://github.com/clojure-emacs/cider/blob/master/cider-test.el)\ndoes for `clojure.test` tests. In fact, most of `Emidje` functionalities were\nstrongly inspired on `cider-test.el` features.\n\nWhen installed, `Emidje` exposes the `emidje-mode`, an Emacs minor-mode that\ncomplements `clojure-mode` and `cider-repl-mode` by providing a set of\nkeybindings to interact with `Midje` facts in a more pleasant way.\n\n## Installation\n\n`Emidje` is available on [Melpa][melpa] and [Melpa stable][melpa-stable], two\nmajor `package.el` community maintained repositories. Soon, the most recommended\nway of installing `Emidje` is through `package.el`, the native Emacs's package\nmanager.\n\nYou can install `Emidje` by typing the following command:\n\n```el\nM-x package-install [RET] emidje [RET]\n```\n\nAfter installing `emidje`, add the following line to your `init.el` file in\norder to enable the automatic injection of the nREPL middleware and activate the\n`emidje-mode` whenever you visit a `Clojure` file or switch to the `Cider's\nREPL` buffer:\n\n```el\n(eval-after-load 'cider\n  #'emidje-setup)\n```\n\nAlternatively, you can write your own function to add `emidje-mode` to the\ndesired hooks:\n\n```el\n(defun my-clojure-hook ()\n\"Enable some minor modes to enhance Clojure development.\"\n  (clj-refactor-mode)\n  (emidje-mode))\n(eval-after-load 'cider\n    #'emidje-enable-nrepl-middleware)\n(add-hook 'clojure-mode-hook #'my-clojure-hook)\n```\n\n## Usage\n\n`Emidje` is a [nREPL][nrepl] client for [midje-nrepl][midje-nrepl]. Therefore,\nthe later must be available in the classpath of your project (see\n[midje-nrepl][midje-nrepl]'s documentation for more details).\n\nIf you start a `REPL` via `M-x cider-jack-in`, you don't need anything else;\n`Emidje` will take care of injecting the correct version of `midje-nrepl` in\nyour `REPL` through `Cider` facilities (see\n[installation](#Installation)). However, if you are connecting to a running\n`nREPL` process, you need to add `midje-nrepl` manually either to your project's\n`project.clj`, or in the `:user` profile found at `~/.lein/profiles.clj`:\n\n```clojure\n:plugins [[nubank/midje-nrepl \"x.x.x\"]]\n```\n\nReplace the `x.x.x` above with the current installed `Emidje`'s version. Notice\nthat those versions should be kept in sync to make sure that the `nREPL` client\nand the `nREPL` middleware are compatible (you will see a warning in the\n`Cider`'s `REPL` when those versions don't match).\n\n### Starting the REPL and loading facts\n\nBy default `Emidje` prevents `Midje` facts from being run when a given test\nnamespace is loaded. This means that `Midje` facts will no longer be checked\nduring the `REPL` startup or as a side effect of commands like `cider-eval-x`,\n`cider-load-buffer`, `cider-refresh`, etc. This behavior is extremely useful,\nmainly on huge projects with heavy and slow integration tests, because it makes\nthe `REPL` startup faster and more reliable. But, if you are acquainted to run\n`Midje` facts with `M-x cider-load-buffer` (`C-c C-k`), be aware that by default\nthis will no longer work with `Emidje`. This should not be a problem since one\nof the core features of `Emidje` is a set of keybindings to run facts (more\nabout that below). However, if you want to check facts on commands that load a\nnamespace or a given `sexpr`, type `M-x emidje-toggle-load-facts-on-eval` to\ndisable this behavior on the current buffer or `C-u M-x\nemidje-toggle-load-facts-on-eval` to disable it globally. Alternatively, you can\ndisable this feature entirely in your `init.el` as follows:\n\n```el\n(setq-default emidje-load-facts-on-eval t)\n```\n\n### Running tests\n\nPress `C-c C-j n` from a source buffer or `REPL` to run all tests related to the\nnamespace where you are currently in. As `cider-test.el` does, `Emidje` employs\na customizable inference logic to figure out the test namespace that corresponds\nto the namespace where you are working on. This means that you can run all tests\ndefined in a given namespace without switching directly to it. Simply press the\naforementioned keys from the implementation namespace and `Emidje` will check\nits facts. Alternatively, you can call `C-u C-c C-j n` from any Clojure source\nfile or from the `REPL` and Emidje will display a list of known test namespaces\nin the current project. By pressing `RET` over any of those namespaces, Emidje\nwill run its tests.\n\nPress `C-c C-j p` to run all tests defined in the project. Alternatively, you\ncan press `C-u C-c C-j p` and Emidje will show you a list of known test paths\nfor the current project. By pressing `RET` over any of those paths, Emidje will\nrun all tests defined within the chosen path.\n\nThe keybinding `C-c C-j r` can be used to re-run tests that didn't pass in the\nlast execution. Use `C-c C-j t` to run the test at point.\n\n### Interacting with reports\n\nTest results are displayed in the `*midje-test-report*` buffer. You can switch\nto this buffer by pressing `C-c C-j s` from a `clojure` namespace or from the\n`REPL`. Once in this buffer, you can navigate across test results, jump to test\ndefinitions, show stacktraces, etc. Follows a list of keybindings that you have\nat your disposal:\n\n| Keybinding | Description |\n| --------------- | --------------------------------------------- |\n| `e` | Show test error and stacktrace |\n| `RET` or `M-.` | Jump to namespace or test definition at point |\n| `n-r` | Move point to next test result |\n| `p-r` | Move point to previous test result |\n| `n-e` | Move point to next error |\n| `p-e` | Move point to previous error |\n| `n-f` | Move point to next failure |\n| `p-f` | Move point to previous failure |\n\n### Formatting tabular facts\n\nMove point to the begining of a `tabular` fact and press `C-c C-j f` and it will\nbe formatted as a right aligned table.\n\n### Customizing\n\nType `M-x customize-group [emidje]` to see a complete list of `Emidje` variables\nthat can be tweaked.\n\n## Changelog\n\nAn extensive changelog is available [here](CHANGELOG.md).\n\n## License\nCopyright © 2018 Nubank\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License.  You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations under the License.\n\n[cider]: https://github.com/clojure-emacs/cider\n[melpa]: https://melpa.org/\n[melpa-stable]: https://stable.melpa.org/\n[midje]: https://github.com/marick/Midje\n[midje-nrepl]: https://github.com/nubank/midje-nrepl\n[nrepl]: https://github.com/nrepl/nrepl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnubank%2Femidje","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnubank%2Femidje","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnubank%2Femidje/lists"}