Files
t3code/packages/shared/src/Array.test.ts
Julius Marmingeandcodex 664d82753f fix(mobile): support Hermes collection sorting
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration.

Co-authored-by: codex <[email protected]>
2026-08-03 11:45:09 -04:00

13 lines
366 B
TypeScript

import { describe, expect, it } from "vite-plus/test";
import { copySorted } from "./Array.ts";
describe("array copies", () => {
it("sorts a copy without mutating the source", () => {
const source = [3, 1, 2];
expect(copySorted(source, (left: number, right: number) => left - right)).toEqual([1, 2, 3]);
expect(source).toEqual([3, 1, 2]);
});
});