theyadev/random-api

View on GitHub
src/__tests__/api.test.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { getRandomApi, getNumberOfApis, getAllApis } from '../index';

test('API, COUNT', async () => {
  expect((await getAllApis()).length).toBe(await getNumberOfApis());
});

test('API Random', async () => {
  expect((await getRandomApi(5)).length).toBe(5);
});