nsh-cli 0.4.0

The nsh command line tool: build, package and run apps.
1
2
3
4
5
6
7
8
9
10
11
12
// The Rust root tested from TypeScript: `nsh test` runs this file in a
// headless runner it builds with the crate, and `open(".")` starts the root
// (`nsh.json` "root").
import { expect, open, test } from "nsh/test";

test("counts taps", async () => {
  const app = await open(".");
  expect(app.texts()).toContain("Count: 0");
  await app.press("Tap");
  await app.press("Tap");
  expect(app.texts()).toContain("Count: 2");
});