Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
add fixtures for cjsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Jan 12, 2016
1 parent 0636806 commit 2dd86ce
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/fixtures/invalid.cjsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @cjsx React.DOM

React = require('react')

Car = React.createClass
render: ->
Vehicle doors={$$$} locked={isLocked()} data-colour="red" on>
<Parts.FrontSeat
<Parts.BackSeat
<p className="seat">Which seat can I take? {@props?.seat or 'none'}</p>
</Vehicle>

React.renderComponent <Car seat="front, obvs" />,
document.getElementById 'container'
14 changes: 14 additions & 0 deletions test/fixtures/valid.cjsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @cjsx React.DOM

React = require('react')

Car = React.createClass
render: ->
<Vehicle doors={4} locked={isLocked()} data-colour="red" on>
<Parts.FrontSeat />
<Parts.BackSeat />
<p className="seat">Which seat can I take? {@props?.seat or 'none'}</p>
</Vehicle>

React.renderComponent <Car seat="front, obvs" />,
document.getElementById 'container'

0 comments on commit 2dd86ce

Please sign in to comment.