Skip to content
ucode-langPublic

About

A modern, non-invasive testing framework for ucode, OpenWrt's scripting language

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

utest

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

Installation

OpenWrt ≤ 24.10:

opkg install ucode-utest

OpenWrt ≥ 25.12:

apk add ucode-utest

Documentation

ucode-lang.org/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

License

MIT — see LICENSE.

About

A modern, non-invasive testing framework for ucode, OpenWrt's scripting language

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages