Add tests for JSX Pragma option

This commit is contained in:
ArrestedDevelopment
2015-03-28 02:20:01 -06:00
parent 4988a27b6c
commit 121b9ca063
6 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
/** @jsx dom */
<Foo></Foo>;
var profile = <div>
<img src="avatar.png" className="profile" />
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
</div>;

View File

@@ -0,0 +1,14 @@
/** @jsx dom */
dom(Foo, null);
var profile = dom(
"div",
null,
dom("img", { src: "avatar.png", className: "profile" }),
dom(
"h3",
null,
[user.firstName, user.lastName].join(" ")
)
);

View File

@@ -0,0 +1,3 @@
{
"jsxPragma": "foo.bar"
}

View File

@@ -0,0 +1,6 @@
<Foo></Foo>;
var profile = <div>
<img src="avatar.png" className="profile" />
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
</div>;

View File

@@ -0,0 +1,12 @@
dom(Foo, null);
var profile = dom(
"div",
null,
dom("img", { src: "avatar.png", className: "profile" }),
dom(
"h3",
null,
[user.firstName, user.lastName].join(" ")
)
);

View File

@@ -0,0 +1,3 @@
{
"jsxPragma": "dom"
}