blob: 1631cf0175b13ba6b16de50e2910b4f681628d46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
describeComponent('search/results_highlighter', function () {
'use strict';
var self;
beforeEach(function () {
self = this;
});
it('highlights only words that matches with the keywords given', function () {
this.setupComponent('<div id="text">Any one seeing too many open bugs</div>');
this.component.attr = {keywords: ["any"]};
self.component.highlightResults(event, {where: '#text'});
var highlightedWords = self.component.$node.find('.search-highlight').length;
expect(highlightedWords).toEqual(1);
});
});
|