UNPKG

vsm-autocomplete

Version:

Vue-component for term+ID lookup based on a vsm-dictionary

16 lines (10 loc) 379 B
import stringTrim from './stringTrim.js'; describe('sub/stringTrim()', () => { it('does not trim a short string', () => { stringTrim('abc', 3).should.equal('abc'); }); it('trims a longer string, ' + 'and includes the ellipsis char in the allowed length', () => { stringTrim('abcd', 3).should.equal('ab…'); // Length is 3, including the '…'. }); });