Skip to content

Commit

Permalink
Merge pull request #2021 from mhnaeem/regression/tests-for-space-in-p…
Browse files Browse the repository at this point in the history
…aren-class-methods

Adding some regression tests to confirm #1151
  • Loading branch information
bitwiseman committed Apr 8, 2022
2 parents 2fe3a93 + ed690db commit 2a935a0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/data/javascript/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,25 @@ exports.test_data = {
input: 'a= f[b];',
output: 'a = f[{{s}}b{{s}}];'
},
{
comment: 'Issue #1151 - inside class methods',
input: [
'export default class Test extends Component {',
' render() {',
' someOther();',
' return null;',
' }',
'}'
],
output: [
'export default class Test extends Component {',
' render({{e}}) {',
' someOther({{e}});',
' return null;',
' }',
'}'
]
},
{
input: [
'{',
Expand Down

0 comments on commit 2a935a0

Please sign in to comment.