summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2015-03-25 11:07:46 +0100
committerLisa Junger <ljunger@thoughtworks.com>2015-03-25 11:07:46 +0100
commit4cdfcbe713b804442de651da9df9b560ede0fc5e (patch)
treeabbaffe56389efbc9f5290be336f8f826e2416c2 /web-ui/test
parent35416a835622c27c4abbe812a1949f8e2480db81 (diff)
small refactoring to unnecessary self maintaining reference to this.
Issue #192
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/search/results_highlighter.spec.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/web-ui/test/spec/search/results_highlighter.spec.js b/web-ui/test/spec/search/results_highlighter.spec.js
index 1631cf01..117f4cfd 100644
--- a/web-ui/test/spec/search/results_highlighter.spec.js
+++ b/web-ui/test/spec/search/results_highlighter.spec.js
@@ -1,18 +1,13 @@
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'});
+ this.component.highlightResults(event, {where: '#text'});
- var highlightedWords = self.component.$node.find('.search-highlight').length;
+ var highlightedWords = this.component.$node.find('.search-highlight').length;
expect(highlightedWords).toEqual(1);
});