A modern, non-invasive testing framework for ucode, OpenWrt's scripting language.
import { describe, it, assert } from 'utest';
describe("add()", () => {
it("returns the sum of two numbers", () => {
assert.match(5, add(2, 3));
});
});[test/unit/add_test.uc] add_test.uc
[PASS] returns the sum of two numbers
Summary:
Suites: 1
Total: 1
Passed: 1
Failed: 0
Errors: 0
Time: 4 ms
OpenWrt ≤ 24.10:
opkg install ucode-utestOpenWrt ≥ 25.12:
apk add ucode-utest| Tutorials | Start here — write your first test, mock, and assertion |
| How-to Guides | Recipes for mocking, CI, filtering, custom proxies, and more |
| Reference | CLI flags, DSL, assertion and mock API |
| Explanation | Design decisions and architecture |
MIT — see LICENSE.