From 479fa57541a18ff6095323f34b6e8b6ecc92ef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 3 Mar 2022 01:51:39 +0100 Subject: [PATCH] Add failing test --- .../no-object-prototype/input.js | 1 + .../no-object-prototype/output.json | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/input.js create mode 100644 packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/output.json diff --git a/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/input.js b/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/input.js new file mode 100644 index 000000000000..469e30de7e0f --- /dev/null +++ b/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/input.js @@ -0,0 +1 @@ +&valueOf; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/output.json b/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/output.json new file mode 100644 index 000000000000..17fcd9d95ac2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/jsx/html-entities/no-object-prototype/output.json @@ -0,0 +1,52 @@ +{ + "type": "File", + "start":0,"end":16,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":16,"index":16}}, + "program": { + "type": "Program", + "start":0,"end":16,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":16,"index":16}}, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start":0,"end":16,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":16,"index":16}}, + "expression": { + "type": "JSXElement", + "start":0,"end":16,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":16,"index":16}}, + "openingElement": { + "type": "JSXOpeningElement", + "start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3}}, + "name": { + "type": "JSXIdentifier", + "start":1,"end":2,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":2,"index":2}}, + "name": "a" + }, + "attributes": [], + "selfClosing": false + }, + "closingElement": { + "type": "JSXClosingElement", + "start":12,"end":16,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":16,"index":16}}, + "name": { + "type": "JSXIdentifier", + "start":14,"end":15,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":15,"index":15}}, + "name": "a" + } + }, + "children": [ + { + "type": "JSXText", + "start":3,"end":12,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":12,"index":12}}, + "extra": { + "rawValue": "function valueOf() { [native code] }", + "raw": "&valueOf;" + }, + "value": "function valueOf() { [native code] }" + } + ] + } + } + ], + "directives": [] + } +}