From 49d9a28a9f1aeae952346b5ef24ecb959ab5a384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vlas=C3=A1k?= Date: Wed, 4 Mar 2020 16:34:37 +0100 Subject: [PATCH] Add test for non-writable binding check --- test/validator/samples/binding-const/errors.json | 15 +++++++++++++++ test/validator/samples/binding-const/input.svelte | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 test/validator/samples/binding-const/errors.json create mode 100644 test/validator/samples/binding-const/input.svelte diff --git a/test/validator/samples/binding-const/errors.json b/test/validator/samples/binding-const/errors.json new file mode 100644 index 0000000000..6d48af9c4e --- /dev/null +++ b/test/validator/samples/binding-const/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "invalid-binding", + "message": "Cannot bind to a variable which is not writable", + "pos": 61, + "start": { + "line": 5, + "column": 19, + "character": 61 + }, + "end": { + "line": 5, + "column": 24, + "character": 66 + } +}] \ No newline at end of file diff --git a/test/validator/samples/binding-const/input.svelte b/test/validator/samples/binding-const/input.svelte new file mode 100644 index 0000000000..8147896730 --- /dev/null +++ b/test/validator/samples/binding-const/input.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file