Files
algorithms/lib/intersectionSortedArray/intersectionSortedArray.test.ts
T

14 lines
449 B
TypeScript

import { describe, it, expect } from "vitest";
import { intersectionSortedArray } from "./intersectionSortedArray.ts";
describe("intersectionSortedArray", () => {
it("[1,2,3,3,4,5,6] [3,3,5] => [3,3,5]", () => {
expect(intersectionSortedArray([1, 2, 3, 3, 4, 5, 6], [3, 3, 5])).toEqual([3, 3, 5]);
});
it("[1,2,3,4,5,6] [3,5] => [3,5]", () => {
expect(intersectionSortedArray([1, 2, 3, 4, 5, 6], [3, 5])).toEqual([3, 5]);
});
});