From 29a34d15ed16e3e6239587fc8d5c527566267c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lins?= Date: Tue, 28 Apr 2020 21:33:05 -0300 Subject: [PATCH] add tests --- .../samples/a11y-anchor-is-valid/input.svelte | 6 +++- .../a11y-anchor-is-valid/warnings.json | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/test/validator/samples/a11y-anchor-is-valid/input.svelte b/test/validator/samples/a11y-anchor-is-valid/input.svelte index 6d0f77a308..8933bd7560 100644 --- a/test/validator/samples/a11y-anchor-is-valid/input.svelte +++ b/test/validator/samples/a11y-anchor-is-valid/input.svelte @@ -1,4 +1,8 @@ not actually a link invalid invalid -invalid \ No newline at end of file +invalid +invalid +invalid +valid +valid \ No newline at end of file diff --git a/test/validator/samples/a11y-anchor-is-valid/warnings.json b/test/validator/samples/a11y-anchor-is-valid/warnings.json index 9438a74f5b..f04c6f1593 100644 --- a/test/validator/samples/a11y-anchor-is-valid/warnings.json +++ b/test/validator/samples/a11y-anchor-is-valid/warnings.json @@ -58,5 +58,35 @@ "character": 102 }, "pos": 77 + }, + { + "code": "a11y-missing-attribute", + "message": "A11y: element should have an href attribute", + "start": { + "line": 5, + "column": 0, + "character": 115 + }, + "end": { + "line": 5, + "column": 22, + "character": 137 + }, + "pos": 115 + }, + { + "code": "a11y-missing-attribute", + "message": "A11y: element should have an href attribute", + "start": { + "line": 6, + "column": 0, + "character": 138 + }, + "end": { + "line": 6, + "column": 20, + "character": 158 + }, + "pos": 138 } ]