From 842e49155cfa47d886d4ca9a88990f47192ea992 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 15 Apr 2018 23:06:57 -0400 Subject: [PATCH] update validation tests --- test/runtime/index.js | 2 +- .../samples/a11y-html-has-lang/input.html | 2 +- .../samples/a11y-html-has-lang/warnings.json | 2 +- .../samples/a11y-iframe-has-title/input.html | 2 +- .../a11y-iframe-has-title/warnings.json | 2 +- .../a11y-tabindex-no-positive/input.html | 2 +- .../await-component-is-used/input.html | 12 ++--- .../binding-input-type-dynamic/errors.json | 2 +- .../binding-input-type-dynamic/input.html | 2 +- .../errors.json | 2 +- .../input.html | 2 +- .../errors.json | 2 +- .../input.html | 2 +- .../component-slot-dynamic/errors.json | 2 +- .../samples/component-slot-dynamic/input.html | 2 +- .../component-slot-each-block/errors.json | 2 +- .../component-slot-each-block/input.html | 4 +- .../component-slotted-each-block/errors.json | 2 +- .../component-slotted-each-block/input.html | 6 +-- .../component-slotted-if-block/errors.json | 2 +- .../component-slotted-if-block/input.html | 6 +-- .../computed-purity-check-no-this/errors.json | 2 +- .../computed-purity-check-no-this/input.html | 2 +- .../errors.json | 2 +- .../computed-purity-check-this-get/input.html | 2 +- .../errors.json | 6 +-- .../input.html | 6 +-- .../each-block-invalid-context/errors.json | 6 +-- .../each-block-invalid-context/input.html | 6 +-- .../each-block-multiple-children/input.html | 10 ++-- .../samples/empty-block-dev/input.html | 6 +-- .../samples/empty-block-dev/warnings.json | 6 +-- .../samples/empty-block-prod/input.html | 6 +-- .../samples/helper-clash-context/input.html | 6 +-- .../helper-clash-context/warnings.json | 6 +-- .../input.html | 2 +- .../warnings.json | 2 +- .../helper-purity-check-this-get/errors.json | 2 +- .../helper-purity-check-this-get/input.html | 2 +- .../input.html | 2 +- .../method-nonexistent-helper/warnings.json | 2 +- .../samples/method-nonexistent/warnings.json | 2 +- .../errors.json | 2 +- .../input.html | 2 +- .../errors.json | 2 +- .../input.html | 2 +- .../errors.json | 13 ----- .../input.html | 9 ---- .../samples/store-unexpected/input.html | 1 - .../samples/store-unexpected/warnings.json | 13 ----- .../input.html | 2 +- .../input.html | 30 +---------- .../warnings.json | 54 +------------------ .../textarea-value-children/errors.json | 2 +- .../textarea-value-children/input.html | 2 +- .../title-no-attributes/errors-v2.json | 13 ----- .../samples/title-no-attributes/errors.json | 2 +- .../samples/title-no-attributes/input-v2.html | 3 -- .../samples/title-no-attributes/input.html | 4 +- .../samples/title-no-children/errors.json | 2 +- .../samples/title-no-children/input.html | 4 +- .../errors.json | 6 +-- .../input.html | 2 +- .../window-binding-invalid-value/errors.json | 6 +-- .../window-binding-invalid-value/input.html | 2 +- .../window-binding-invalid-width/errors.json | 6 +-- .../window-binding-invalid-width/input.html | 2 +- .../window-binding-invalid/errors.json | 6 +-- .../samples/window-binding-invalid/input.html | 2 +- .../samples/window-binding-online/input.html | 2 +- .../samples/window-event-invalid/input.html | 2 +- .../window-event-invalid/warnings.json | 8 +-- 72 files changed, 111 insertions(+), 243 deletions(-) delete mode 100644 test/validator/samples/properties-computed-no-destructuring/errors.json delete mode 100644 test/validator/samples/properties-computed-no-destructuring/input.html delete mode 100644 test/validator/samples/store-unexpected/input.html delete mode 100644 test/validator/samples/store-unexpected/warnings.json delete mode 100644 test/validator/samples/title-no-attributes/errors-v2.json delete mode 100644 test/validator/samples/title-no-attributes/input-v2.html diff --git a/test/runtime/index.js b/test/runtime/index.js index 806b0dab79..109615f309 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -25,7 +25,7 @@ function getName(filename) { return base[0].toUpperCase() + base.slice(1); } -describe.only("runtime", () => { +describe("runtime", () => { before(() => { svelte = loadSvelte(false); svelte$ = loadSvelte(true); diff --git a/test/validator/samples/a11y-html-has-lang/input.html b/test/validator/samples/a11y-html-has-lang/input.html index 41f2fc6276..0fa84d90a6 100644 --- a/test/validator/samples/a11y-html-has-lang/input.html +++ b/test/validator/samples/a11y-html-has-lang/input.html @@ -1,5 +1,5 @@ - + diff --git a/test/validator/samples/a11y-html-has-lang/warnings.json b/test/validator/samples/a11y-html-has-lang/warnings.json index c8c7c51cc6..7189296725 100644 --- a/test/validator/samples/a11y-html-has-lang/warnings.json +++ b/test/validator/samples/a11y-html-has-lang/warnings.json @@ -10,6 +10,6 @@ "line": 5, "column": 13 }, - "pos": 84 + "pos": 82 } ] diff --git a/test/validator/samples/a11y-iframe-has-title/input.html b/test/validator/samples/a11y-iframe-has-title/input.html index 2b5060b80e..5e07ca5a08 100644 --- a/test/validator/samples/a11y-iframe-has-title/input.html +++ b/test/validator/samples/a11y-iframe-has-title/input.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/test/validator/samples/a11y-iframe-has-title/warnings.json b/test/validator/samples/a11y-iframe-has-title/warnings.json index 33706158df..3dc5a6644a 100644 --- a/test/validator/samples/a11y-iframe-has-title/warnings.json +++ b/test/validator/samples/a11y-iframe-has-title/warnings.json @@ -8,7 +8,7 @@ }, "end": { "line": 1, - "column": 31 + "column": 29 }, "pos": 0 } diff --git a/test/validator/samples/a11y-tabindex-no-positive/input.html b/test/validator/samples/a11y-tabindex-no-positive/input.html index fa34d69f2d..e922078221 100644 --- a/test/validator/samples/a11y-tabindex-no-positive/input.html +++ b/test/validator/samples/a11y-tabindex-no-positive/input.html @@ -1,4 +1,4 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/test/validator/samples/await-component-is-used/input.html b/test/validator/samples/await-component-is-used/input.html index f27202d6dd..17f2d04d36 100644 --- a/test/validator/samples/await-component-is-used/input.html +++ b/test/validator/samples/await-component-is-used/input.html @@ -1,10 +1,10 @@ -{{#await promise}} +{#await promise}

Loading

-{{then data}} - -{{catch err}} -

Error: {{err}}

-{{/await}} +{:then data} + +{:catch err} +

Error: {err}

+{/await} diff --git a/test/validator/samples/properties-computed-must-be-valid-function-names/errors.json b/test/validator/samples/properties-computed-must-be-valid-function-names/errors.json index 7cdc2df451..8759767afd 100644 --- a/test/validator/samples/properties-computed-must-be-valid-function-names/errors.json +++ b/test/validator/samples/properties-computed-must-be-valid-function-names/errors.json @@ -7,7 +7,7 @@ }, "end": { "line": 9, - "column": 28 + "column": 16 }, "pos": 87 }] diff --git a/test/validator/samples/properties-computed-must-be-valid-function-names/input.html b/test/validator/samples/properties-computed-must-be-valid-function-names/input.html index 1c9173f523..35e2c598e0 100644 --- a/test/validator/samples/properties-computed-must-be-valid-function-names/input.html +++ b/test/validator/samples/properties-computed-must-be-valid-function-names/input.html @@ -6,7 +6,7 @@ }; }, computed: { - "with-hyphen": a => a * 2 + "with-hyphen": ({ a }) => a * 2 } }; diff --git a/test/validator/samples/properties-computed-no-destructuring/errors.json b/test/validator/samples/properties-computed-no-destructuring/errors.json deleted file mode 100644 index 7ac9e009d6..0000000000 --- a/test/validator/samples/properties-computed-no-destructuring/errors.json +++ /dev/null @@ -1,13 +0,0 @@ -[{ - "code": "invalid-computed-arguments", - "message": "Computed properties cannot use destructuring in function parameters", - "loc": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - }, - "pos": 62 -}] diff --git a/test/validator/samples/properties-computed-no-destructuring/input.html b/test/validator/samples/properties-computed-no-destructuring/input.html deleted file mode 100644 index ae88d47b9e..0000000000 --- a/test/validator/samples/properties-computed-no-destructuring/input.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - diff --git a/test/validator/samples/store-unexpected/input.html b/test/validator/samples/store-unexpected/input.html deleted file mode 100644 index 589f28e647..0000000000 --- a/test/validator/samples/store-unexpected/input.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/validator/samples/store-unexpected/warnings.json b/test/validator/samples/store-unexpected/warnings.json deleted file mode 100644 index 5e0f69f8e6..0000000000 --- a/test/validator/samples/store-unexpected/warnings.json +++ /dev/null @@ -1,13 +0,0 @@ -[{ - "code": "options-missing-store", - "message": "compile with `store: true` in order to call store methods", - "loc": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 29 - }, - "pos": 18 -}] \ No newline at end of file diff --git a/test/validator/samples/svg-child-component-declared-namespace/input.html b/test/validator/samples/svg-child-component-declared-namespace/input.html index c158d7fdf5..536f47107e 100644 --- a/test/validator/samples/svg-child-component-declared-namespace/input.html +++ b/test/validator/samples/svg-child-component-declared-namespace/input.html @@ -1,4 +1,4 @@ - +