[Pkg-javascript-commits] [node-acorn-jsx] 426/484: Add regression test for #15.
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:21:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-acorn-jsx.
commit e93b69d59579da69b042c875bfa6925a9840e641
Author: Ingvar Stepanyan <me at rreverser.com>
Date: Sun Jan 25 00:27:06 2015 +0200
Add regression test for #15.
---
test/tests-jsx.js | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/test/tests-jsx.js b/test/tests-jsx.js
index b952a4f..6604c34 100644
--- a/test/tests-jsx.js
+++ b/test/tests-jsx.js
@@ -40,6 +40,7 @@ var fbTestFixture = {
end: { line: 1, column: 5 }
}
},
+
'<n:a n:v />': {
type: 'ExpressionStatement',
expression: {
@@ -128,6 +129,7 @@ var fbTestFixture = {
end: { line: 1, column: 11 }
}
},
+
'<a n:foo="bar"> {value} <b><c /></b></a>': {
type: 'ExpressionStatement',
expression: {
@@ -330,6 +332,7 @@ var fbTestFixture = {
end: { line: 1, column: 40 }
}
},
+
'<a b={" "} c=" " d="&" e="&r;" />': {
type: "ExpressionStatement",
expression: {
@@ -416,6 +419,7 @@ var fbTestFixture = {
},
range: [0, 40]
},
+
'<a\n/>': {
type: "ExpressionStatement",
expression: {
@@ -489,6 +493,7 @@ var fbTestFixture = {
}
}
},
+
'<日本語></日本語>': {
type: "ExpressionStatement",
expression: {
@@ -2541,6 +2546,7 @@ var fbTestFixture = {
}
}
},
+
'<A aa={aa.bb.cc} bb={bb.cc.dd}><div>{aa.b}</div></A>': {
"type": "ExpressionStatement",
"start": 0,
@@ -3442,6 +3448,99 @@ var fbTestFixture = {
raw: "/text"
}]
}
+ },
+
+ '<div>{a}{b}</div>': {
+ type: "ExpressionStatement",
+ start: 0,
+ end: 17,
+ expression: {
+ type: "JSXElement",
+ start: 0,
+ end: 17,
+ openingElement: {
+ type: "JSXOpeningElement",
+ start: 0,
+ end: 5,
+ attributes: [],
+ name: {
+ type: "JSXIdentifier",
+ start: 1,
+ end: 4,
+ name: "div"
+ },
+ selfClosing: false
+ },
+ closingElement: {
+ type: "JSXClosingElement",
+ start: 11,
+ end: 17,
+ name: {
+ type: "JSXIdentifier",
+ start: 13,
+ end: 16,
+ name: "div"
+ }
+ },
+ children: [{
+ type: 'JSXExpressionContainer',
+ expression: {
+ type: 'Identifier',
+ name: 'a',
+ range: [6, 7],
+ loc: {
+ start: {
+ line: 1,
+ column: 6
+ },
+ end: {
+ line: 1,
+ column: 7
+ }
+ }
+ },
+ range: [5, 8],
+ loc: {
+ start: {
+ line: 1,
+ column: 5
+ },
+ end: {
+ line: 1,
+ column: 8
+ }
+ }
+ }, {
+ type: 'JSXExpressionContainer',
+ expression: {
+ type: 'Identifier',
+ name: 'b',
+ range: [9, 10],
+ loc: {
+ start: {
+ line: 1,
+ column: 9
+ },
+ end: {
+ line: 1,
+ column: 10
+ }
+ }
+ },
+ range: [8, 11],
+ loc: {
+ start: {
+ line: 1,
+ column: 8
+ },
+ end: {
+ line: 1,
+ column: 11
+ }
+ }
+ }
+ ]
+ }
}
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git
More information about the Pkg-javascript-commits
mailing list