Merge lp:~jtv/maas/bug-1376990-js-test-lint into lp:~maas-committers/maas/trunk

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 3189
Proposed branch: lp:~jtv/maas/bug-1376990-js-test-lint
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 47 lines (+6/-6)
1 file modified
src/maasserver/static/js/tests/test_image_views.js (+6/-6)
To merge this branch: bzr merge lp:~jtv/maas/bug-1376990-js-test-lint
Reviewer Review Type Date Requested Status
Christian Reis (community) Approve
Blake Rouse (community) Approve
Review via email: mp+236985@code.launchpad.net

Commit message

Fix some lint in a JavaScript test. The JS lint checker doesn't always show these things, but when it does, it makes development difficult.

Description of the change

Inconsistent lint reports mean that we have to jump in and fix lint when we see it — the author of the code will have checked for lint but not gotten any reports.

Another part of the lint fix is to follow. The part you see here should be uncontroversial: only a test is affected, and it's a known browser compatibility pitfall — a trailing comma after the last element in an array or object breaks hard in IE (or at least it used to, not all that long ago).

Jeroen

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) :
review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Thanks.

Revision history for this message
Christian Reis (kiko) wrote :

Land away

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/static/js/tests/test_image_views.js'
2--- src/maasserver/static/js/tests/test_image_views.js 2014-10-02 15:40:55 +0000
3+++ src/maasserver/static/js/tests/test_image_views.js 2014-10-03 03:01:56 +0000
4@@ -180,7 +180,7 @@
5 status: "Complete",
6 downloading: false,
7 numberOfNodes: 1,
8- lastUpdate: '10/1/14',
9+ lastUpdate: '10/1/14'
10 },
11 {
12 id: 2,
13@@ -193,7 +193,7 @@
14 status: "Complete",
15 downloading: false,
16 numberOfNodes: 0,
17- lastUpdate: '10/1/14',
18+ lastUpdate: '10/1/14'
19 },
20 {
21 id: 3,
22@@ -206,8 +206,8 @@
23 status: "Downloading 13%",
24 downloading: true,
25 numberOfNodes: 0,
26- lastUpdate: '10/1/14',
27- },
28+ lastUpdate: '10/1/14'
29+ }
30 ];
31 },
32
33@@ -327,12 +327,12 @@
34 {
35 id: 1,
36 rtype: Y.maas.enums.BOOT_RESOURCE_TYPE.SYNCED,
37- name: "centos/centos65",
38+ name: "centos/centos65"
39 },
40 {
41 id: 2,
42 rtype: Y.maas.enums.BOOT_RESOURCE_TYPE.SYNCED,
43- name: "centos/centos70",
44+ name: "centos/centos70"
45 }
46 ];
47 var view = this.makeImagesView(false, false, none_ubuntu_images);