Skip to content

Commit d945478

Browse files
Source formatting
1 parent 6b480e8 commit d945478

1 file changed

Lines changed: 19 additions & 31 deletions

File tree

test/ColorTracker.js

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ module.exports = {
1212
},
1313

1414
testConstructorEmpty: function(test) {
15-
var colors;
15+
var colors;
1616
var tracker;
1717

18-
test.doesNotThrow(
19-
function() {
20-
tracker = new tracking.ColorTracker();
21-
}
22-
);
18+
test.doesNotThrow(function() {
19+
tracker = new tracking.ColorTracker();
20+
});
2321

2422
colors = tracker.getColors();
2523
test.equal(1, colors.length, 'Colors array should have a single value');
@@ -32,21 +30,17 @@ module.exports = {
3230
var colors;
3331
var tracker;
3432

35-
test.doesNotThrow(
36-
function() {
37-
tracker = new tracking.ColorTracker('yellow');
38-
}
39-
);
33+
test.doesNotThrow(function() {
34+
tracker = new tracking.ColorTracker('yellow');
35+
});
4036

4137
colors = tracker.getColors();
4238
test.equal(1, colors.length, 'Colors array should have a single value');
4339
test.equal('yellow', colors[0], 'The colors array should be set to value in the constructor');
4440

45-
test.throws(
46-
function() {
47-
tracker = new tracking.ColorTracker('notvalid');
48-
}
49-
);
41+
test.throws(function() {
42+
tracker = new tracking.ColorTracker('notvalid');
43+
});
5044

5145
test.done();
5246
},
@@ -55,32 +49,26 @@ module.exports = {
5549
var colors;
5650
var tracker;
5751

58-
test.doesNotThrow(
59-
function() {
60-
tracker = new tracking.ColorTracker([]);
61-
}
62-
);
52+
test.doesNotThrow(function() {
53+
tracker = new tracking.ColorTracker([]);
54+
});
6355

6456
colors = tracker.getColors();
6557
test.equal(0, colors.length, 'Colors array should be empty');
6658

67-
test.doesNotThrow(
68-
function() {
69-
tracker = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);
70-
}
71-
);
59+
test.doesNotThrow(function() {
60+
tracker = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);
61+
});
7262

7363
colors = tracker.getColors();
7464
test.equal(3, colors.length, 'Colors array have 3 values');
7565
test.equal('magenta', colors[0], 'The colors array should be set to values in the constructor');
7666
test.equal('cyan', colors[1], 'The colors array should be set to values in the constructor');
7767
test.equal('yellow', colors[2], 'The colors array should be set to values in the constructor');
7868

79-
test.throws(
80-
function() {
81-
tracker = new tracking.ColorTracker(['magenta', null, 'yellow']);
82-
}
83-
);
69+
test.throws(function() {
70+
tracker = new tracking.ColorTracker(['magenta', null, 'yellow']);
71+
});
8472

8573
test.done();
8674
},

0 commit comments

Comments
 (0)