UNPKG

relevant-animals

Version:

Return cute animals, made for everyone with useful methods using promises and snekfetch.

14 lines (11 loc) 383 B
const animals = require('../index.js'); const test = require('ava'); test('Fetch random cat', t => animals.cat() .then(cat => t.truthy(cat)) .catch(err => t.falsy(err))); test('Fetch random dog', t => animals.dog() .then(dog => t.truthy(dog)) .catch(err => t.falsy(err))); test('Fetch random shibe', t => animals.cat() .then(shibe => t.truthy(shibe)) .catch(err => t.falsy(err)));