Permalink
Browse files

Added tests for newlines between chained methods

Closes #892
  • Loading branch information...
1 parent d963e9c commit 5952364b500bbcf4b01a88aa9267b49d37a5eb5e @bitwiseman bitwiseman committed Jan 2, 2017
@@ -2471,6 +2471,17 @@ function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify,
' });\n' +
'}\n' +
'["navigating"].forEach(bindBrowserEvent);');
+
+ // Issue #892 - new line between chained methods
+ bt(
+ 'foo\n' +
+ ' .who()\n' +
+ '\n' +
+ ' .knows()\n' +
+ ' // comment\n' +
+ ' .nothing() // comment\n' +
+ '\n' +
+ ' .more()');
//============================================================
@@ -2299,6 +2299,17 @@ def unicode_char(value):
' });\n' +
'}\n' +
'["navigating"].forEach(bindBrowserEvent);')
+
+ # Issue #892 - new line between chained methods
+ bt(
+ 'foo\n' +
+ ' .who()\n' +
+ '\n' +
+ ' .knows()\n' +
+ ' // comment\n' +
+ ' .nothing() // comment\n' +
+ '\n' +
+ ' .more()')
#============================================================
@@ -2234,6 +2234,19 @@ exports.test_data = {
'}',
'["navigating"].forEach(bindBrowserEvent);'
]
+ },
+ {
+ comment: "Issue #892 - new line between chained methods ",
+ unchanged: [
+ 'foo',
+ ' .who()',
+ '',
+ ' .knows()',
+ ' // comment',
+ ' .nothing() // comment',
+ '',
+ ' .more()'
+ ]
}
]
}, {

0 comments on commit 5952364

Please sign in to comment.