UNPKG

@ahsolo/lotide

Version:

lotide assignment for Lighthouse Labs coding bootcamp

19 lines (16 loc) 676 B
const assert = require('chai').assert; const findKeyByValue = require('../findKeyByValue'); // Test Case const bestTVShowsByGenre = { sci_fi: "The Expanse", comedy: "Brooklyn Nine-Nine", drama: "The Wire" }; describe("#findKeyByValue", () => { it ('should return "drama" when asked to find the key associated with "The Wire"', () => { assert.strictEqual(findKeyByValue(bestTVShowsByGenre, "The Wire"), "drama"); }); }); // assertEqual(findKeyByValue(bestTVShowsByGenre, "The Wire"), "drama"); // assertEqual(findKeyByValue(bestTVShowsByGenre, "That '70s Show"), undefined); // assertEqual(findKeyByValue(bestTVShowsByGenre, "Brooklyn Nine-Nine"), "comedy");