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.

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]);
});
});