A test utility and badge to put in your val readme to show test suite status
Example:
Usage:
describe
and it
utilitiesurl
parameter pointing to the test suite file's endpoint. Tests run whenever the test suite file or the badge is fetchedimport { describe, it } from "https://esm.town/x/jxnblk/test/http.tsx";
import { assertEquals } from "jsr:@std/assert@1";
export default describe("my test suite", () => {
const sum = (a, b) => a + b;
it("sums it up", () => {
assertEquals(sum(1, 2), 3);
})
})
Badge:
[![][badge]][url]
[badge]: https://testme.val.run?url=YOUR_TEST_SUITE_ENDPOINT
[url]: YOUR_TEST_SUITE_URL
Example
[![][badge]][url]
[badge]: https://testme.val.run?url=https://tuna-test.val.run
[url]: https://www.val.town/x/jxnblk/test/code/example.http.tsx