diff options
author | Bruno Wagner <bwagner@thoughtworks.com> | 2014-10-07 15:01:42 +0200 |
---|---|---|
committer | Bruno Wagner <bwagner@thoughtworks.com> | 2014-10-07 15:01:54 +0200 |
commit | 6299531f4c8f7daa1b4afab45d0439f635b03982 (patch) | |
tree | 92b2876e732731e5219e50ef7719c72ec2cb478a /web-ui/test/spec/tags | |
parent | 88abefd3e62fb65a08dde62a7d7e4ce1fa22f563 (diff) |
Fixed jshint errors
Diffstat (limited to 'web-ui/test/spec/tags')
-rw-r--r-- | web-ui/test/spec/tags/data/tags.spec.js | 2 | ||||
-rw-r--r-- | web-ui/test/spec/tags/ui/tag_list.spec.js | 14 | ||||
-rw-r--r-- | web-ui/test/spec/tags/ui/tag_shortcut.spec.js | 16 |
3 files changed, 21 insertions, 11 deletions
diff --git a/web-ui/test/spec/tags/data/tags.spec.js b/web-ui/test/spec/tags/data/tags.spec.js index a8b160fd..41821366 100644 --- a/web-ui/test/spec/tags/data/tags.spec.js +++ b/web-ui/test/spec/tags/data/tags.spec.js @@ -1,3 +1,5 @@ +/* global Pixelated */ + describeComponent('tags/data/tags', function () { 'use strict'; diff --git a/web-ui/test/spec/tags/ui/tag_list.spec.js b/web-ui/test/spec/tags/ui/tag_list.spec.js index 5c33f36e..85cc4509 100644 --- a/web-ui/test/spec/tags/ui/tag_list.spec.js +++ b/web-ui/test/spec/tags/ui/tag_list.spec.js @@ -1,3 +1,7 @@ +/* global _ */ +/* global Pixelated */ +/* global jasmine */ + describeComponent('tags/ui/tag_list', function () { 'use strict'; var tagsShortcutsContainer; @@ -11,12 +15,12 @@ describeComponent('tags/ui/tag_list', function () { describe('post initialization', function () { beforeEach(function () { setupComponent(); - tagsShortcutsContainer = $('<ul>', { id: "tags-shortcuts" }); + tagsShortcutsContainer = $('<ul>', { id: 'tags-shortcuts' }); $('body').append(tagsShortcutsContainer); }); - afterEach(function () { - $('body')[0].removeChild(tagsShortcutsContainer[0]) + jasmine.afterEach(function () { + $('body')[0].removeChild(tagsShortcutsContainer[0]); }); it('should render tags when tagsList:load is received', function () { @@ -83,7 +87,7 @@ describeComponent('tags/ui/tag_list', function () { var tagList = [tag('tag1', 1, false), tag('tag2', 2, true), tag('tag3', 3, true)]; $(document).trigger(Pixelated.events.ui.tagList.load, {tags: tagList}); - var tagList = [tag('tag1', 1, false), tag('tag2', 2, true)]; + tagList = [tag('tag1', 1, false), tag('tag2', 2, true)]; $(document).trigger(Pixelated.events.ui.tagList.load, {tags: tagList}); var customTags = _.map(this.component.select('customTagList').find('li'), function (el) { @@ -101,7 +105,7 @@ describeComponent('tags/ui/tag_list', function () { var tagList = [tag('inbox', 1, true)]; $(document).trigger(Pixelated.events.ui.tagList.load, {tags: tagList}); - var tagList = [tag('sent', 1, true)]; + tagList = [tag('sent', 1, true)]; $(document).trigger(Pixelated.events.ui.tagList.load, {tags: tagList}); var shortcuts = _.map($('#tags-shortcuts').find('li'), function (el) { diff --git a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js index 862e0d1c..ebc852d0 100644 --- a/web-ui/test/spec/tags/ui/tag_shortcut.spec.js +++ b/web-ui/test/spec/tags/ui/tag_shortcut.spec.js @@ -1,4 +1,8 @@ -describeComponent("tags/ui/tag_shortcut", function () { +/* global jasmine */ +/* global Pixelated */ + +describeComponent('tags/ui/tag_shortcut', function () { + 'use strict'; var parent, shortcut, component, TagShortcut; @@ -6,13 +10,13 @@ describeComponent("tags/ui/tag_shortcut", function () { TagShortcut = require('tags/ui/tag_shortcut'); component = jasmine.createSpyObj('tagComponent', ['triggerSelect']); - parent = $("<ul>"); + parent = $('<ul>'); $('body').append(parent); shortcut = TagShortcut.appendedTo(parent, { linkTo: { name: 'inbox', counts: { total: 15 }}, trigger: component }); }); - afterEach(function () { - $('body')[0].removeChild(parent[0]) + jasmine.afterEach(function () { + $('body')[0].removeChild(parent[0]); }); it('renders the shortcut inside the parent', function () { @@ -24,11 +28,11 @@ describeComponent("tags/ui/tag_shortcut", function () { it('selects and unselect on tag.select', function () { $(document).trigger(Pixelated.events.ui.tag.select, { tag: 'inbox'}); - expect(shortcut.$node).toHaveClass("selected"); + expect(shortcut.$node).toHaveClass('selected'); $(document).trigger(Pixelated.events.ui.tag.select, { tag: 'sent'}); - expect(shortcut.$node).not.toHaveClass("selected"); + expect(shortcut.$node).not.toHaveClass('selected'); }); it('delegates the click to linked tag', function (){ |