12 lines · 366 B · TypeScript
RawDownload
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]);  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t