You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
399 B
TypeScript
13 lines
399 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { sortedSquares } from "./sortedSquares.ts";
|
|
|
|
describe("sortedSquares", () => {
|
|
it("[-4,-1,0,3,10] => [0,1,9,16,100]", () => {
|
|
expect(sortedSquares([-4, -1, 0, 3, 10])).toEqual([0, 1, 9, 16, 100]);
|
|
});
|
|
|
|
it("[-7,-3,2,3,11] => [4,9,9,49,121]", () => {
|
|
expect(sortedSquares([-7, -3, 2, 3, 11])).toEqual([4, 9, 9, 49, 121]);
|
|
});
|
|
});
|