Public
Like
4
test_migrated
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
main.tsx
https://jxnblk--6901d46c251511f094ab569c3dd06744.web.val.run
NOTE: This val has moved to https://val.town/x/jxnblk/test
A test utility and badge to put in your val readme to show test suite status
Example:
Usage:
- Make a val
- Make a separate test suite HTTP val for the val you want to test
- Import
describe
andit
utilities - Write tests
- Add the badge to your readme, with the
url
parameter pointing to the test suite val's endpoint. Tests run whenever the test suite val or the badge is fetched
import { describe, it } from "https://esm.town/v/jxnblk/test";
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://jxnblk-test.web.val.run?url=YOUR_TEST_SUITE_ENDPOINT
[url]: YOUR_TEST_SUITE_URL
Example
[![][badge]][url]
[badge]: https://jxnblk-test.web.val.run?url=https://jxnblk-tunatestsuite.web.val.run
[url]: https://www.val.town/v/jxnblk/tunaTestSuite
Migrated from folder: _LEAVE_AS_IS/test