sj-freitas/forofa

View on GitHub
lib/functions/__tests__/repeat.test.js

Summary

Maintainability
A
0 mins
Test Coverage
const { repeat } = require("./../repeat");

describe("repeat function", () => {
  it("Repeat generates an iterator with 5x letter B", () => {
    const iterable = repeat("B", 5);

    expect(Array.from(iterable)).toEqual(["B", "B", "B", "B", "B"]);
  });
});