ert
CommunityAutomated Elisp testing.
Authorhugoduncan
Version1.0.0
Installs0
System Documentation
What problem does it solve?
ERT provides a structured framework for defining and running Emacs Lisp tests, enabling interactive and batch testing, with helpful failure reports to reduce debugging time and guard against regressions.
Core Features & Use Cases
- Test Definitions: Write tests with
ert-deftest, including optional docstrings and metadata. - Assertions: Use
should,should-not, andshould-errorfor precise validations and error checks. - Test Execution: Run tests interactively via M-x ert or in batch mode for CI/CD workflows.
- Debugging: Integrated debugging support with backtraces and reruns to quickly locate and fix issues.
- Mocking & Fixtures: Leverage common patterns (e.g.,
cl-letf,unwind-protect) to isolate tests.
Quick Start
To get started:
- Require the library:
(require 'ert) - Define a simple test:
(ert-deftest my-test () "Simple test." (should (= 1 1))) - Run tests interactively:
M-x ert RET t RET - Run tests in batch mode for CI:
emacs -batch -l ert -f ert-run-tests-batch-and-exit - Review results in the ERT buffer and press
dto debug a failing test.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: ert Download link: https://github.com/hugoduncan/library-skills/archive/main.zip#ert Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.