git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on v0.2.1 help sign in
14 lines 466 B history raw
1import { describe, it, expect } from "vitest";
2import { shareImpl } from "../src/Yoga/React/Native/Share.js";
4describe("Share FFI", () => {
5 it("shareImpl returns a cancellable aff that resolves", async () => {
6 let result;
7 shareImpl({ message: "Hello", title: "Title", url: "" })(
8 (err) => { throw err; },
9 (val) => { result = val; }
10 );
11 await new Promise((r) => setTimeout(r, 10));
12 expect(result).toHaveProperty("action");
13 });
14});