nsh-cli 0.5.0

The nsh command line tool: build, package and run apps.
1
2
3
4
5
6
7
8
9
10
11
// `nsh test` runs this file in a headless runner it builds with the crate:
// the count lives in Rust (`Counter`), its wording too (`Format.times`).
import { expect, open, test } from "nsh/test";

test("counts presses", async () => {
  const app = await open("./App.tsx");
  expect(app.texts()).toContain("Not pressed yet");
  await app.press("Press me");
  await app.press("Press me");
  expect(app.texts()).toContain("Pressed twice");
});