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

Commit 2dd86ce

Browse files
committed
add fixtures for cjsx
1 parent 0636806 commit 2dd86ce

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/fixtures/invalid.cjsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# @cjsx React.DOM
2+
3+
React = require('react')
4+
5+
Car = React.createClass
6+
render: ->
7+
Vehicle doors={$$$} locked={isLocked()} data-colour="red" on>
8+
<Parts.FrontSeat
9+
<Parts.BackSeat
10+
<p className="seat">Which seat can I take? {@props?.seat or 'none'}</p>
11+
</Vehicle>
12+
13+
React.renderComponent <Car seat="front, obvs" />,
14+
document.getElementById 'container'

test/fixtures/valid.cjsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# @cjsx React.DOM
2+
3+
React = require('react')
4+
5+
Car = React.createClass
6+
render: ->
7+
<Vehicle doors={4} locked={isLocked()} data-colour="red" on>
8+
<Parts.FrontSeat />
9+
<Parts.BackSeat />
10+
<p className="seat">Which seat can I take? {@props?.seat or 'none'}</p>
11+
</Vehicle>
12+
13+
React.renderComponent <Car seat="front, obvs" />,
14+
document.getElementById 'container'

0 commit comments

Comments
 (0)