Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve linting issues in test/helpers
- Loading branch information
Showing
17 changed files
with
56 additions
and
44 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
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
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,9 +1,10 @@ | ||
module.exports = function supportDefaultAssignment() { | ||
try { | ||
var E = eval("class E { toString() { return 'default' } }") | ||
var f1 = eval("(function f1({a, b = E}) {return new b().toString();})") | ||
return f1({a: "test"}) === "default" ; | ||
} catch(e) { | ||
// eslint-disable-next-line no-unused-vars | ||
var E = eval("class E { toString() { return 'default' } }"); | ||
var f1 = eval("(function f1({a, b = E}) {return new b().toString();})"); | ||
return f1({ a: "test" }) === "default"; | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |
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,10 @@ | ||
module.exports = function supportArrowFunctionExpression() { | ||
try { | ||
eval("var foo = function(fn) {return fn.toString()}; foo(() => {return 'a'})"); | ||
eval( | ||
"var foo = function(fn) {return fn.toString()}; foo(() => {return 'a'})" | ||
); | ||
return true; | ||
} catch(e) { | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |
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,10 @@ | ||
module.exports = function supportsBlockScoping() { | ||
try { | ||
var f = eval("(function f() { const x = 1; if (true) { const x = 2; } return x; })"); | ||
var f = eval( | ||
"(function f() { const x = 1; if (true) { const x = 2; } return x; })" | ||
); | ||
return f() === 1; | ||
} catch(e) { | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |
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
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 @@ | ||
module.exports = function supportDefaultAssignment() { | ||
try { | ||
var f = eval("(function f() { for(var x of ['ok', 'fail']) return x; })"); | ||
return f() === "ok" ; | ||
} catch(e) { | ||
return f() === "ok"; | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |
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
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,9 +1,10 @@ | ||
module.exports = function supportsSpread() { | ||
try { | ||
var x = { a: true }, y; // eslint-disable-line no-unused-vars | ||
var x = { a: true }, | ||
y; // eslint-disable-line no-unused-vars | ||
eval("y = { ...x }"); | ||
return y !== x && y.a; | ||
} catch(e) { | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |
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,7 +1,7 @@ | ||
module.exports = function supportsWebAssembly() { | ||
try { | ||
return typeof WebAssembly !== "undefined"; | ||
} catch(e) { | ||
} catch (e) { | ||
return false; | ||
} | ||
}; |