1import { describe, it, expect } from "vitest";
2import { currentState, addEventListenerImpl, removeSubscription } from "../src/Yoga/React/Native/AppState.js";
4describe("AppState FFI", () => {
5 it("currentState returns a string", () => {
6 const state = currentState();
7 expect(typeof state).toBe("string");
10 it("addEventListenerImpl returns a subscription", () => {
11 const sub = addEventListenerImpl("change", (state) => {});
12 expect(sub).toBeDefined();
13 expect(typeof sub.remove).toBe("function");
16 it("removeSubscription calls remove", () => {
17 const sub = addEventListenerImpl("change", (state) => {});
18 expect(() => removeSubscription(sub)()).not.toThrow();
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list