UNPKG

@gleefullychill/lotide

Version:

A library based off of lodash for a student project

15 lines (14 loc) 456 B
const findKey = require('../findKey'); const assert = require('chai').assert; describe('#FindKey', () => { it('returns the expected key given a condition and an object', () => { assert.equal(findKey({ "Blue Hill": { stars: 1 }, "Akaleri": { stars: 3 }, "noma": { stars: 2 }, "elBulli": { stars: 3 }, "Ora": { stars: 2 }, "Akelarre": { stars: 3 } }, x => x.stars === 1), 'Blue Hill'); }); });