1import { describe, it, expect } from "vitest";
2import { get, getFontScale, getPixelSizeForLayoutSize, roundToNearestPixel } from "../src/Yoga/React/Native/PixelRatio.js";
4describe("PixelRatio FFI", () => {
5 it("get is a number", () => {
6 expect(typeof get).toBe("number");
7 expect(get).toBeGreaterThan(0);
10 it("getFontScale is a number", () => {
11 expect(typeof getFontScale).toBe("number");
12 expect(getFontScale).toBeGreaterThan(0);
15 it("getPixelSizeForLayoutSize scales a value", () => {
16 const result = getPixelSizeForLayoutSize(100);
17 expect(typeof result).toBe("number");
18 expect(result).toBeGreaterThan(0);
21 it("roundToNearestPixel rounds a value", () => {
22 const result = roundToNearestPixel(100.3);
23 expect(typeof result).toBe("number");
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