[Pkg-javascript-commits] [node-acorn-jsx] 396/484: Add a test for issue #201
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:21:01 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 dac747dfa9390e84ae9e1b1a10327bd800116d1a
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Sat Jan 17 22:26:34 2015 +0100
Add a test for issue #201
---
test/tests-harmony.js | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/test/tests-harmony.js b/test/tests-harmony.js
index 7f45357..eb8b8c5 100644
--- a/test/tests-harmony.js
+++ b/test/tests-harmony.js
@@ -14746,3 +14746,97 @@ test("class A { *static() {} }", {
ranges: true,
locations: true
});
+
+test("`${/\d/.exec('1')[0]}`", {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 0,
+ "end": 21,
+ "expressions": [
+ {
+ "type": "MemberExpression",
+ "start": 3,
+ "end": 19,
+ "object": {
+ "type": "CallExpression",
+ "start": 3,
+ "end": 16,
+ "callee": {
+ "type": "MemberExpression",
+ "start": 3,
+ "end": 11,
+ "object": {
+ "type": "Literal",
+ "start": 3,
+ "end": 6,
+ "regex": {
+ "pattern": "d",
+ "flags": ""
+ },
+ "value": {},
+ "raw": "/d/"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 11,
+ "name": "exec"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "start": 12,
+ "end": 15,
+ "value": "1",
+ "raw": "'1'"
+ }
+ ]
+ },
+ "property": {
+ "type": "Literal",
+ "start": 17,
+ "end": 18,
+ "value": 0,
+ "raw": "0"
+ },
+ "computed": true
+ }
+ ],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 1,
+ "end": 1,
+ "value": {
+ "raw": "",
+ "cooked": ""
+ },
+ "tail": false
+ },
+ {
+ "type": "TemplateElement",
+ "start": 20,
+ "end": 20,
+ "value": {
+ "raw": "",
+ "cooked": ""
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+}, {
+ ecmaVersion: 6
+});
--
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