From 2858cf582ee25ab216148c3cfb74d34ed20ab6e3 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 6 Apr 2022 14:20:20 +0900 Subject: [PATCH] add test for shorthand this --- .../samples/dinamic-element-this/errors.json | 15 +++++++++++++++ .../samples/dinamic-element-this/input.svelte | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 test/validator/samples/dinamic-element-this/errors.json create mode 100644 test/validator/samples/dinamic-element-this/input.svelte diff --git a/test/validator/samples/dinamic-element-this/errors.json b/test/validator/samples/dinamic-element-this/errors.json new file mode 100644 index 0000000000..7d61c20ee2 --- /dev/null +++ b/test/validator/samples/dinamic-element-this/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "unexpected-reserved-word", + "message": "'this' is a reserved word in JavaScript and cannot be used here", + "start": { + "line": 2, + "column": 18, + "character": 24 + }, + "end": { + "line": 2, + "column": 18, + "character": 24 + }, + "pos": 24 + }] diff --git a/test/validator/samples/dinamic-element-this/input.svelte b/test/validator/samples/dinamic-element-this/input.svelte new file mode 100644 index 0000000000..1a5079b924 --- /dev/null +++ b/test/validator/samples/dinamic-element-this/input.svelte @@ -0,0 +1,3 @@ +
+ foo +