Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/dummy/app/assets/javascripts/harmony_example.js.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ var HarmonyComponent = React.createClass({
},
render: function(){
var greeting = HarmonyComponent.generateGreeting();
var { active, ...other } = { active: true, x: 1, y:2 }
return (
<h1 {...this.props}>{greeting}</h1>
<div>
<h1 {...this.props}>{greeting}</h1>
<div active={active}>
<span {...other} />
</div>
</div>
)
},
});
});
1 change: 1 addition & 0 deletions test/jsxtransform_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
assert_match(/generateGreeting:\s*function\(\)/, @response.body, "object literal methods")
assert_match(/React.__spread/, @response.body, "spreading props")
assert_match(/Your greeting is: '" \+ insertedGreeting \+ "'/, @response.body, "string interpolation")
assert_match(/active=\$__0\.active/, @response.body, "destructuring assignment")
end

test 'accepts strip_types: true option' do
Expand Down