The whole public API
In-memory implementations of every class and function in obsidian.d.ts, tracked against each new Obsidian release.
The whole public API
In-memory implementations of every class and function in obsidian.d.ts, tracked against each new Obsidian release.
Globals and prototypes
The extensions Obsidian installs on DOM and JS builtins — createDiv, el.setText, Array.prototype.contains — installed and torn down for you.
Strict by default
Reading a property nobody mocked throws a descriptive error instead of returning undefined, so a test cannot pass for the wrong reason.
Spyable everywhere
All construction routes through create__() factories and constructor__() hooks, so vi.spyOn() reaches it.
Vitest and Jest
One-line setup entry points for both, plus a framework-agnostic setup() / teardown() pair for everything else.
100% covered
Lines, branches, functions and statements — enforced on every build.
Getting started
Test runner setup
Importing the mocks
Creating mock instances
Strict mocks
Type bridging
obsidian-typings
Design principles