UNPKG

@tommymynnson/lotide

Version:

A mini clone of the [Lodash](https://lodash.com) library.

21 lines (19 loc) 612 B
const assert = require('chai').assert; const letterPositions = require('../letterPositions'); describe('#letterPositions', () => { it('should return { l: [0], i: [1, 11], g: [2], h: [3, 5, 15, 18], t: [4, 14], o: [6, 19], u: [7, 20], s: [8, 21], e: [9, 16, 22], n: [12] } for \'lighthouse in the house\'', () => { const expected = { l: [0], i: [1, 11], g: [2], h: [3, 5, 15, 18], t: [4, 14], o: [6, 19], u: [7, 20], s: [8, 21], e: [9, 16, 22], n: [12] }; assert.deepEqual(letterPositions('lighthouse in the house'), expected); }); });