Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start linting all test/ files as part of test script (#704)
In an effort of ensuring consistent code style in test files as with the "production" source code, we should run eslint as part of the `$ npm test` script as well. Most of the related fixes was done by `eslint` using the `--fix` argument. Only special configuration tweaks for tests compared to the other source code, is to allow functions declaration without names. The rationale for allowing that in tests, is that the important reason we have them in the source code (proper stacktraces) aren't as important in test files.
- Loading branch information
Showing
66 changed files
with
225 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../.eslintrc", | ||
"rules": { | ||
"func-names": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
message: "Some <code>" | ||
}) | ||
message: 'Some <code>' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
({ | ||
'apos': "'", | ||
'control': 'X' | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
array_of_strings: ['hello', 'world'] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
({ | ||
valueOf: 'Avoids methods', | ||
watch: 'in Object.prototype' | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
value: "\\abc" | ||
}) | ||
value: '\\abc' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
tag: "yo" | ||
}) | ||
tag: 'yo' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
length: 'hello' | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
({ | ||
"foo": "foooooooooooooo", | ||
"bar": "<b>bar!</b>" | ||
}) | ||
'foo': 'foooooooooooooo', | ||
'bar': '<b>bar!</b>' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
({ | ||
number: function(text, render) { | ||
return function(text, render) { | ||
number: function (text, render) { | ||
return function (text, render) { | ||
return +render(text); | ||
} | ||
}; | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
({ | ||
title: function () { | ||
return "A Comedy of Errors"; | ||
return 'A Comedy of Errors'; | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
({ | ||
header: function () { | ||
return "Colors"; | ||
return 'Colors'; | ||
}, | ||
item: [ | ||
{name: "red", current: true, url: "#Red"}, | ||
{name: "green", current: false, url: "#Green"}, | ||
{name: "blue", current: false, url: "#Blue"} | ||
{name: 'red', current: true, url: '#Red'}, | ||
{name: 'green', current: false, url: '#Green'}, | ||
{name: 'blue', current: false, url: '#Blue'} | ||
], | ||
link: function () { | ||
return this["current"] !== true; | ||
return this['current'] !== true; | ||
}, | ||
list: function () { | ||
return this.item.length !== 0; | ||
}, | ||
empty: function () { | ||
return this.item.length === 0; | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
({ | ||
"outer": { | ||
"id": 1, | ||
"second": { | ||
"nothing": 2 | ||
'outer': { | ||
'id': 1, | ||
'second': { | ||
'nothing': 2 | ||
} | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
({ | ||
first: "It worked the first time.", | ||
second: "And it worked the second time.", | ||
third: "Then, surprisingly, it worked the third time.", | ||
fourth: "Fourth time also fine!." | ||
}) | ||
first: 'It worked the first time.', | ||
second: 'And it worked the second time.', | ||
third: 'Then, surprisingly, it worked the third time.', | ||
fourth: 'Fourth time also fine!.' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
({ | ||
bedrooms: true, | ||
total: 1 | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
({ | ||
foo: true, | ||
bar: "{{win}}", | ||
win: "FAIL" | ||
}) | ||
bar: '{{win}}', | ||
win: 'FAIL' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
jobs: [] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
({}) | ||
({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
({ | ||
description: "That is all!", | ||
description: 'That is all!', | ||
child: { | ||
description: "" | ||
description: '' | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
({}) | ||
({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
bar: 2 | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
({ | ||
title: function () { | ||
return "Bear > Shark"; | ||
return 'Bear > Shark'; | ||
}, | ||
symbol: null, | ||
entities: "" \"'<>`=/" | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
({ | ||
"emptyString": "", | ||
"emptyArray": [], | ||
"zero": 0, | ||
"null": null, | ||
"undefined": undefined, | ||
"NaN": 0/0 | ||
}) | ||
'emptyString': '', | ||
'emptyArray': [], | ||
'zero': 0, | ||
'null': null, | ||
'undefined': undefined, | ||
'NaN': 0/0 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
({ | ||
"list": [ | ||
["", "emptyString"], | ||
[[], "emptyArray"], | ||
[0, "zero"], | ||
[null, "null"], | ||
[undefined, "undefined"], | ||
[0/0, "NaN"] | ||
'list': [ | ||
['', 'emptyString'], | ||
[[], 'emptyArray'], | ||
[0, 'zero'], | ||
[null, 'null'], | ||
[undefined, 'undefined'], | ||
[0/0, 'NaN'] | ||
] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
] | ||
} | ||
] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
({ | ||
name: "Tater", | ||
helper: "To tinker?", | ||
name: 'Tater', | ||
helper: 'To tinker?', | ||
bolder: function () { | ||
return function (text, render) { | ||
return text + ' => <b>' + render(text) + '</b> ' + this.helper; | ||
} | ||
}; | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
name: 'janl' | ||
} | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
html: "I like {{mustache}}" | ||
}) | ||
html: 'I like {{mustache}}' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
({ | ||
"repos": [] | ||
}) | ||
'repos': [] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
({ | ||
"person?": { | ||
name: "Jon" | ||
'person?': { | ||
name: 'Jon' | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
({}) | ||
({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
({}) | ||
({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
({ name: 'Bruno' }) | ||
({ name: 'Bruno' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
bar: 'bar' | ||
}] | ||
}] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
{a: {b: 2}}, | ||
{a: {b: 3}} | ||
] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
items: [1, 2, 3, 4] | ||
} | ||
] | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
({ | ||
"name": "David", | ||
"twitter": "@dasilvacontin", | ||
"farray": [ | ||
["Flor", "@florrts"], | ||
["Miquel", null], | ||
["Chris", undefined] | ||
] | ||
}) | ||
'name': 'David', | ||
'twitter': '@dasilvacontin', | ||
'farray': [ | ||
['Flor', '@florrts'], | ||
['Miquel', null], | ||
['Chris', undefined] | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
({ | ||
"name": "David", | ||
"twitter": "@dasilvacontin", | ||
"fobject": [ | ||
'name': 'David', | ||
'twitter': '@dasilvacontin', | ||
'fobject': [ | ||
{ | ||
"name": "Flor", | ||
"twitter": "@florrts" | ||
'name': 'Flor', | ||
'twitter': '@florrts' | ||
}, | ||
{ | ||
"name": "Miquel", | ||
"twitter": null | ||
'name': 'Miquel', | ||
'twitter': null | ||
}, | ||
{ | ||
"name": "Chris", | ||
"twitter": undefined | ||
'name': 'Chris', | ||
'twitter': undefined | ||
} | ||
], | ||
"favorites": { | ||
"color": "blue", | ||
"president": "Bush", | ||
"show": "Futurama" | ||
'favorites': { | ||
'color': 'blue', | ||
'president': 'Bush', | ||
'show': 'Futurama' | ||
}, | ||
"mascot": { | ||
"name": "Squid", | ||
"favorites": { | ||
"color": "orange", | ||
"president": undefined, | ||
"show": null | ||
'mascot': { | ||
'name': 'Squid', | ||
'favorites': { | ||
'color': 'orange', | ||
'president': undefined, | ||
'show': null | ||
} | ||
} | ||
}) | ||
}); |
Oops, something went wrong.