deno.land / x / froebel@v0.23.2 / repeat.test.ts

repeat.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
import repeat from "./repeat.ts";import { assertEquals } from "testing/asserts.ts";
Deno.test("repeat", () => { const result: number[] = []; for (const n of repeat(1, 2, 3)) { result.push(n); if (result.length >= 9) break; } assertEquals(result, [1, 2, 3, 1, 2, 3, 1, 2, 3]);});
froebel

Version Info

Tagged at
a year ago