FireWyrm (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/michael-tiger-2010/wyvernjs/llms.txt
Use this file to discover all available pages before exploring further.
fw) is WyvernJS’s built-in testing module. It runs every test sequentially through a Promise-based queue, supports async test functions natively without any additional setup, and organises tests into named sections that each emit their own pass/fail summary. Results are printed to the console using clear ✅/❌ markers. FireWyrm ships as a single file with no dependencies and targets ES9+ environments — it works in modern browsers and in Node.js, and is exported under both the full name firewyrm and the short alias fw.
When to use FireWyrm
FireWyrm is the right choice when you want tests without a build pipeline:- Zero-config browser smoke tests — drop one
<script>tag in an HTML file and start asserting immediately. - Small projects — when a full Jest/Vitest setup would outweigh the codebase itself, FireWyrm lets you stay focused on the logic being tested.
- Single-file test runner — no
npm test, no config files, no watchers. Load the script, callfw.start()…fw.end(), and read the results in the console. - Async-heavy code — the sequential queue means you can freely
awaitinside test functions; there is no race between tests.
Basic test structure
The entire API follows one pattern: register tests betweenfw.start() and fw.end(), optionally organising them into sections with fw.section().
fw.test() accepts any function that returns a truthy value — sync or async. fw.assert() returns a chainable matcher object so you can express expectations more precisely. Both methods return fw itself, allowing fluent chaining if preferred.
Output format
When the test run completes, FireWyrm flushes all buffered output toconsole.log (or a custom logging function you provide) in this order:
=== header, lists every test with its ✅ or ❌ outcome, and closes with a SECTION RESULTS: x/y passed line followed by an overall section ✅/❌. After all sections, a final summary reports total tests, passes, and failures.
FireWyrm uses a sequential queue — tests run in the exact order they are registered, even across
async test functions. No two tests run concurrently.Explore further
Tests & Assertions
Full reference for fw.test(), fw.assert(), and all 40 chainable matchers.
Mocking
Replace object methods with stubs using fw.mock() and restore them afterwards.