diff options
| author | Stephen Blott | 2015-05-27 08:34:15 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-05-27 08:35:34 +0100 | 
| commit | e27da85676a9d62145ed7ef56e125de2e133ae10 (patch) | |
| tree | 412fc458e08805a9836d63dcb76f1b7ae2b0a517 /tests/unit_tests | |
| parent | 9b9c26a42bffa88584d44526da5e14a5e546fa07 (diff) | |
| download | vimium-e27da85676a9d62145ed7ef56e125de2e133ae10.tar.bz2 | |
Custom-only: single-line completions for custom search engines.
Diffstat (limited to 'tests/unit_tests')
| -rw-r--r-- | tests/unit_tests/completion_test.coffee | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee index 88df0a43..4a0cf746 100644 --- a/tests/unit_tests/completion_test.coffee +++ b/tests/unit_tests/completion_test.coffee @@ -244,7 +244,7 @@ context "suggestions",        url: "url"        title: "title <span>"        relevancyFunction: returns 1 -    assert.isTrue suggestion.generateHtml().indexOf("title <span>") >= 0 +    assert.isTrue suggestion.generateHtml({}).indexOf("title <span>") >= 0    should "highlight query words", ->      suggestion = new Suggestion @@ -254,7 +254,7 @@ context "suggestions",        title: "ninjawords"        relevancyFunction: returns 1      expected = "<span class='vomnibarMatch'>ninj</span>a<span class='vomnibarMatch'>words</span>" -    assert.isTrue suggestion.generateHtml().indexOf(expected) >= 0 +    assert.isTrue suggestion.generateHtml({}).indexOf(expected) >= 0    should "highlight query words correctly when whey they overlap", ->      suggestion = new Suggestion @@ -264,7 +264,7 @@ context "suggestions",        title: "ninjawords"        relevancyFunction: returns 1      expected = "<span class='vomnibarMatch'>ninjaword</span>s" -    assert.isTrue suggestion.generateHtml().indexOf(expected) >= 0 +    assert.isTrue suggestion.generateHtml({}).indexOf(expected) >= 0    should "shorten urls", ->      suggestion = new Suggestion @@ -273,7 +273,7 @@ context "suggestions",        url: "http://ninjawords.com"        title: "ninjawords"        relevancyFunction: returns 1 -    assert.equal -1, suggestion.generateHtml().indexOf("http://ninjawords.com") +    assert.equal -1, suggestion.generateHtml({}).indexOf("http://ninjawords.com")  context "RankingUtils.wordRelevancy",    should "score higher in shorter URLs", -> | 
