From 206a3d0131f8c01c762c68d75f4af413942289b1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 8 Feb 2019 09:32:36 -0500 Subject: [PATCH] update tests --- register.js | 3 ++- test/cli/samples/basic/command.sh | 2 +- test/cli/samples/basic/expected/Main.js | 2 +- test/cli/samples/custom-element/command.sh | 2 +- test/cli/samples/custom-element/expected/Main.js | 2 +- test/cli/samples/dev/command.sh | 2 +- test/cli/samples/dev/expected/Main.js | 4 ++-- test/cli/samples/dir-sourcemap/expected/Main.js | 4 ++-- .../cli/samples/dir-sourcemap/expected/Main.js.map | 2 +- test/cli/samples/dir-sourcemap/expected/Widget.js | 2 +- .../samples/dir-sourcemap/expected/Widget.js.map | 2 +- test/cli/samples/dir-subdir/expected/Main.js | 4 ++-- .../samples/dir-subdir/expected/widget/Widget.js | 2 +- test/cli/samples/dir/expected/Main.js | 4 ++-- test/cli/samples/dir/expected/Widget.js | 2 +- test/cli/samples/globals/command.sh | 2 +- test/cli/samples/globals/expected/Main.js | 2 +- test/cli/samples/sourcemap-inline/command.sh | 2 +- test/cli/samples/sourcemap-inline/expected/Main.js | 2 +- test/cli/samples/sourcemap/command.sh | 2 +- test/cli/samples/sourcemap/expected/Main.js | 2 +- test/cli/samples/sourcemap/expected/Main.js.map | 2 +- test/cli/samples/ssr/command.sh | 2 +- test/cli/samples/ssr/expected/Main.js | 2 +- test/cli/samples/store/command.sh | 2 +- test/cli/samples/store/expected/Main.js | 2 +- test/css/index.js | 2 +- .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 test/css/samples/empty-class/_config.js | 2 +- .../nested/{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../css/samples/unused-selector-leading/_config.js | 4 ++-- .../{expected.svelte => expected.html} | 0 .../css/samples/unused-selector-ternary/_config.js | 2 +- .../{expected.svelte => expected.html} | 0 test/css/samples/unused-selector/_config.js | 2 +- .../{expected.svelte => expected.html} | 0 test/custom-elements/index.js | 2 +- test/custom-elements/samples/custom-method/test.js | 2 +- test/custom-elements/samples/escaped-css/test.js | 2 +- test/custom-elements/samples/html-slots/test.js | 2 +- test/custom-elements/samples/html/test.js | 2 +- test/custom-elements/samples/nested.skip/test.js | 2 +- test/custom-elements/samples/new-styled/test.js | 2 +- test/custom-elements/samples/new/test.js | 2 +- .../samples/no-missing-prop-warnings/test.js | 2 +- test/custom-elements/samples/oncreate/test.js | 2 +- test/custom-elements/samples/props/test.js | 2 +- test/helpers.js | 2 +- test/hydration/index.js | 4 ++-- .../samples/basic/{_after.svelte => _after.html} | 0 .../samples/basic/{_before.svelte => _before.html} | 0 .../binding-input/{_after.svelte => _after.html} | 0 .../binding-input/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../component/{_after.svelte => _after.html} | 0 .../component/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../dynamic-text/{_after.svelte => _after.html} | 0 .../dynamic-text/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../each-block/{_after.svelte => _after.html} | 0 .../each-block/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../element-nested/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../element-ref/{_after.svelte => _after.html} | 0 .../element-ref/{_before.svelte => _before.html} | 0 .../event-handler/{_after.svelte => _after.html} | 0 .../event-handler/{_before.svelte => _before.html} | 0 .../if-block-anchor/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block-false/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block-update/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block/{_after.svelte => _after.html} | 0 .../if-block/{_before.svelte => _before.html} | 0 .../samples/raw/{_after.svelte => _after.html} | 0 .../samples/raw/{_before.svelte => _before.html} | 0 .../top-level-text/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 test/js/index.js | 2 +- test/js/samples/dynamic-import/expected.js | 4 ++-- test/js/samples/non-imported-component/expected.js | 2 +- test/parser/index.js | 2 +- test/preprocess/index.js | 4 ++-- test/preprocess/samples/filename/_config.js | 2 +- test/preprocess/samples/filename/output.svelte | 4 ++-- test/runtime/index.js | 6 +++--- .../ComponentSelector.svelte | 2 +- .../samples/component-binding-deep-b/_config.js | 12 ++++++------ .../samples/element-source-location/_config.js | 6 +++--- test/server-side-rendering/index.js | 14 +++----------- .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../bindings/{_expected.svelte => _expected.html} | 0 .../comment/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../component/{_expected.svelte => _expected.html} | 0 .../computed/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../entities/{_expected.svelte => _expected.html} | 0 .../{_expected-head.svelte => _expected-head.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../helpers/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../styles/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../triple/{_expected.svelte => _expected.html} | 0 test/sourcemaps/index.js | 6 +++--- test/sourcemaps/samples/basic/test.js | 4 ++-- .../samples/binding-shorthand.skip/test.js | 2 +- test/sourcemaps/samples/binding/test.js | 4 ++-- test/sourcemaps/samples/css/test.js | 2 +- test/sourcemaps/samples/each-block/test.js | 2 +- test/sourcemaps/samples/script/test.js | 2 +- test/sourcemaps/samples/static-no-script/test.js | 4 ++-- test/stats/index.js | 2 +- test/validator/index.js | 2 +- .../samples/a11y-not-on-components/warnings.json | 6 +++--- .../samples/action-on-component/errors.json | 6 +++--- .../component-slot-dynamic-attribute/errors.json | 6 +++--- .../component-slotted-each-block/errors.json | 6 +++--- .../samples/component-slotted-if-block/errors.json | 6 +++--- test/validator/samples/prop-slot/errors.json | 6 +++--- .../samples/transition-on-component/errors.json | 6 +++--- 183 files changed, 113 insertions(+), 120 deletions(-) rename test/css/samples/combinator-child/{expected.svelte => expected.html} (100%) rename test/css/samples/descendant-selector-non-top-level-outer/{expected.svelte => expected.html} (100%) rename test/css/samples/nested/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-contains/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-prefix/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-suffix/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-class-dynamic/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-class-static/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-class/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-global/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-id/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-whitespace-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-whitespace/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector-leading/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector-ternary/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector/{expected.svelte => expected.html} (100%) rename test/hydration/samples/basic/{_after.svelte => _after.html} (100%) rename test/hydration/samples/basic/{_before.svelte => _before.html} (100%) rename test/hydration/samples/binding-input/{_after.svelte => _after.html} (100%) rename test/hydration/samples/binding-input/{_before.svelte => _before.html} (100%) rename test/hydration/samples/component-in-element/{_after.svelte => _after.html} (100%) rename test/hydration/samples/component-in-element/{_before.svelte => _before.html} (100%) rename test/hydration/samples/component/{_after.svelte => _after.html} (100%) rename test/hydration/samples/component/{_before.svelte => _before.html} (100%) rename test/hydration/samples/dynamic-text-changed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/dynamic-text-changed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/dynamic-text/{_after.svelte => _after.html} (100%) rename test/hydration/samples/dynamic-text/{_before.svelte => _before.html} (100%) rename test/hydration/samples/each-block-arg-clash/{_after.svelte => _after.html} (100%) rename test/hydration/samples/each-block-arg-clash/{_before.svelte => _before.html} (100%) rename test/hydration/samples/each-block/{_after.svelte => _after.html} (100%) rename test/hydration/samples/each-block/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-added/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-added/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-changed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-changed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-removed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-removed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-unchanged/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-unchanged/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-nested/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-nested/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-ref/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-ref/{_before.svelte => _before.html} (100%) rename test/hydration/samples/event-handler/{_after.svelte => _after.html} (100%) rename test/hydration/samples/event-handler/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-anchor/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-anchor/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-false/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-false/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-update/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-update/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block/{_before.svelte => _before.html} (100%) rename test/hydration/samples/raw/{_after.svelte => _after.html} (100%) rename test/hydration/samples/raw/{_before.svelte => _before.html} (100%) rename test/hydration/samples/top-level-text/{_after.svelte => _after.html} (100%) rename test/hydration/samples/top-level-text/{_before.svelte => _before.html} (100%) rename test/server-side-rendering/samples/attribute-boolean/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-dynamic/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes-spread/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-static/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/bindings/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/comment/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-binding-renamed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-binding/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-data-dynamic/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-data-empty/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-refs-and-attributes/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-refs/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-with-different-extension/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-yield/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/computed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/default-data-override/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/default-data/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/directives/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/dynamic-text-escaped/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/dynamic-text/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/each-block/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/empty-elements-closed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/entities/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/head-title/{_expected-head.svelte => _expected-head.html} (100%) rename test/server-side-rendering/samples/head-title/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/helpers/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/if-block-false/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/if-block-true/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/import-non-component/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/raw-mustaches/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/sanitize-name/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/static-div/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/static-text/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/styles-nested/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/styles/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/textarea-children/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/textarea-value/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/triple/{_expected.svelte => _expected.html} (100%) diff --git a/register.js b/register.js index cbd4a387ac..4dee2a4b6a 100644 --- a/register.js +++ b/register.js @@ -3,7 +3,7 @@ const path = require('path'); const { compile } = require('./compiler.js'); let compileOptions = { - extensions: ['.html'] + extensions: ['.svelte', '.html'] }; function capitalise(name) { @@ -43,6 +43,7 @@ function registerExtension(extension) { }; } +registerExtension('.svelte'); registerExtension('.html'); module.exports = register; \ No newline at end of file diff --git a/test/cli/samples/basic/command.sh b/test/cli/samples/basic/command.sh index 0ae80e4c95..9e272a7d5b 100644 --- a/test/cli/samples/basic/command.sh +++ b/test/cli/samples/basic/command.sh @@ -1 +1 @@ -svelte compile src/Main.html > actual/Main.js +svelte compile src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js index ba35a0c1e9..ecc2beb83c 100644 --- a/test/cli/samples/basic/expected/Main.js +++ b/test/cli/samples/basic/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/custom-element/command.sh b/test/cli/samples/custom-element/command.sh index b93c2cb16a..ee9f854e9b 100644 --- a/test/cli/samples/custom-element/command.sh +++ b/test/cli/samples/custom-element/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --customElement > actual/Main.js +svelte compile src/Main.svelte --customElement > actual/Main.js diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js index 40865a2c81..f6befc4e3b 100644 --- a/test/cli/samples/custom-element/expected/Main.js +++ b/test/cli/samples/custom-element/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dev/command.sh b/test/cli/samples/dev/command.sh index 37d9b87fc0..b9dc99e7d1 100644 --- a/test/cli/samples/dev/command.sh +++ b/test/cli/samples/dev/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -d > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -d > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js index be11885fa0..db75c4a5c1 100644 --- a/test/cli/samples/dev/expected/Main.js +++ b/test/cli/samples/dev/expected/Main.js @@ -1,6 +1,6 @@ -/* src/Main.html generated by Svelte v2.13.4 */ +/* src/Main.svelte generated by Svelte v2.13.4 */ -const file = "src/Main.html"; +const file = "src/Main.svelte"; function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js b/test/cli/samples/dir-sourcemap/expected/Main.js index 0c0fab6094..e164569e1c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js +++ b/test/cli/samples/dir-sourcemap/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js.map b/test/cli/samples/dir-sourcemap/expected/Main.js.map index 621cf85109..a0f4cf48c7 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js b/test/cli/samples/dir-sourcemap/expected/Widget.js index b6019a73fd..d55dcbda4c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js.map b/test/cli/samples/dir-sourcemap/expected/Widget.js.map index 57807d3fc0..37247333ed 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js.map @@ -1 +1 @@ -{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["

widget

"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Widget.js","sources":["../src/Widget.svelte"],"sourcesContent":["

widget

"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/expected/Main.js b/test/cli/samples/dir-subdir/expected/Main.js index 2778c8c868..3026a122e2 100644 --- a/test/cli/samples/dir-subdir/expected/Main.js +++ b/test/cli/samples/dir-subdir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './widget/Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './widget/Widget.svelte'; diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index 9282b7ddb4..e63ac2dad7 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -1,4 +1,4 @@ -/* src/widget/Widget.html generated by Svelte vx.y.z */ +/* src/widget/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir/expected/Main.js b/test/cli/samples/dir/expected/Main.js index bbc005da76..d87ac37939 100644 --- a/test/cli/samples/dir/expected/Main.js +++ b/test/cli/samples/dir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index c5981a4c53..eeb37e3cfa 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/globals/command.sh b/test/cli/samples/globals/command.sh index 9ed0c2a844..9e1a2de74a 100644 --- a/test/cli/samples/globals/command.sh +++ b/test/cli/samples/globals/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 1c6e01cdb8..8e526b08bf 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ var Main = (function(answer) { "use strict"; answer = (answer && answer.__esModule) ? answer["default"] : answer; diff --git a/test/cli/samples/sourcemap-inline/command.sh b/test/cli/samples/sourcemap-inline/command.sh index 36b5b71b8d..073fa7d259 100644 --- a/test/cli/samples/sourcemap-inline/command.sh +++ b/test/cli/samples/sourcemap-inline/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m inline -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m inline -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index 668ff8b1bf..534c6734f2 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap/command.sh b/test/cli/samples/sourcemap/command.sh index 4309d50b89..9164b1760c 100644 --- a/test/cli/samples/sourcemap/command.sh +++ b/test/cli/samples/sourcemap/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 95e6718715..59059aadcb 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap/expected/Main.js.map b/test/cli/samples/sourcemap/expected/Main.js.map index a3be94cb9a..a31dec16ab 100644 --- a/test/cli/samples/sourcemap/expected/Main.js.map +++ b/test/cli/samples/sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["

Hello world!

\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["

Hello world!

\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/ssr/command.sh b/test/cli/samples/ssr/command.sh index 30e155691a..878f6038ab 100644 --- a/test/cli/samples/ssr/command.sh +++ b/test/cli/samples/ssr/command.sh @@ -1 +1 @@ -svelte compile --generate ssr src/Main.html > actual/Main.js +svelte compile --generate ssr src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/ssr/expected/Main.js b/test/cli/samples/ssr/expected/Main.js index adf4e19fa0..b7a4f4addf 100644 --- a/test/cli/samples/ssr/expected/Main.js +++ b/test/cli/samples/ssr/expected/Main.js @@ -2,7 +2,7 @@ var Main = {}; -Main.filename = "src/Main.html"; +Main.filename = "src/Main.svelte"; Main.data = function() { return {}; diff --git a/test/cli/samples/store/command.sh b/test/cli/samples/store/command.sh index a734fdc772..dedeae05ef 100644 --- a/test/cli/samples/store/command.sh +++ b/test/cli/samples/store/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --store > actual/Main.js +svelte compile src/Main.svelte --store > actual/Main.js diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index dbd365c15d..28bc62b786 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var h1, text0, text1; diff --git a/test/css/index.js b/test/css/index.js index 913dcf4237..9e32b0ea5d 100644 --- a/test/css/index.js +++ b/test/css/index.js @@ -51,7 +51,7 @@ describe('css', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = tryRequire(`./samples/${dir}/_config.js`) || {}; const input = fs - .readFileSync(`test/css/samples/${dir}/input.html`, 'utf-8') + .readFileSync(`test/css/samples/${dir}/input.svelte`, 'utf-8') .replace(/\s+$/, ''); const expectedWarnings = (config.warnings || []).map(normalizeWarning); diff --git a/test/css/samples/combinator-child/expected.svelte b/test/css/samples/combinator-child/expected.html similarity index 100% rename from test/css/samples/combinator-child/expected.svelte rename to test/css/samples/combinator-child/expected.html diff --git a/test/css/samples/descendant-selector-non-top-level-outer/expected.svelte b/test/css/samples/descendant-selector-non-top-level-outer/expected.html similarity index 100% rename from test/css/samples/descendant-selector-non-top-level-outer/expected.svelte rename to test/css/samples/descendant-selector-non-top-level-outer/expected.html diff --git a/test/css/samples/empty-class/_config.js b/test/css/samples/empty-class/_config.js index fb1565c7bc..cc766d9478 100644 --- a/test/css/samples/empty-class/_config.js +++ b/test/css/samples/empty-class/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/nested/expected.svelte b/test/css/samples/nested/expected.html similarity index 100% rename from test/css/samples/nested/expected.svelte rename to test/css/samples/nested/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector/expected.html diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte b/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte rename to test/css/samples/omit-scoping-attribute-class-dynamic/expected.html diff --git a/test/css/samples/omit-scoping-attribute-class-static/expected.svelte b/test/css/samples/omit-scoping-attribute-class-static/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-static/expected.svelte rename to test/css/samples/omit-scoping-attribute-class-static/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant/expected.html diff --git a/test/css/samples/omit-scoping-attribute-global/expected.svelte b/test/css/samples/omit-scoping-attribute-global/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-global/expected.svelte rename to test/css/samples/omit-scoping-attribute-global/expected.html diff --git a/test/css/samples/omit-scoping-attribute-id/expected.svelte b/test/css/samples/omit-scoping-attribute-id/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-id/expected.svelte rename to test/css/samples/omit-scoping-attribute-id/expected.html diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-whitespace/expected.svelte b/test/css/samples/omit-scoping-attribute-whitespace/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace/expected.svelte rename to test/css/samples/omit-scoping-attribute-whitespace/expected.html diff --git a/test/css/samples/omit-scoping-attribute/expected.svelte b/test/css/samples/omit-scoping-attribute/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute/expected.svelte rename to test/css/samples/omit-scoping-attribute/expected.html diff --git a/test/css/samples/unused-selector-leading/_config.js b/test/css/samples/unused-selector-leading/_config.js index c01e978405..20310a5847 100644 --- a/test/css/samples/unused-selector-leading/_config.js +++ b/test/css/samples/unused-selector-leading/_config.js @@ -1,7 +1,7 @@ export default { warnings: [ { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { @@ -25,7 +25,7 @@ export default { }, { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-leading/expected.svelte b/test/css/samples/unused-selector-leading/expected.html similarity index 100% rename from test/css/samples/unused-selector-leading/expected.svelte rename to test/css/samples/unused-selector-leading/expected.html diff --git a/test/css/samples/unused-selector-ternary/_config.js b/test/css/samples/unused-selector-ternary/_config.js index 043a7addf9..68254477d9 100644 --- a/test/css/samples/unused-selector-ternary/_config.js +++ b/test/css/samples/unused-selector-ternary/_config.js @@ -4,7 +4,7 @@ export default { }, warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-ternary/expected.svelte b/test/css/samples/unused-selector-ternary/expected.html similarity index 100% rename from test/css/samples/unused-selector-ternary/expected.svelte rename to test/css/samples/unused-selector-ternary/expected.html diff --git a/test/css/samples/unused-selector/_config.js b/test/css/samples/unused-selector/_config.js index 5f6abbc08b..49fb3a27e7 100644 --- a/test/css/samples/unused-selector/_config.js +++ b/test/css/samples/unused-selector/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector/expected.svelte b/test/css/samples/unused-selector/expected.html similarity index 100% rename from test/css/samples/unused-selector/expected.svelte rename to test/css/samples/unused-selector/expected.html diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index e50434cc61..d2641cb5b0 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -72,7 +72,7 @@ describe('custom-elements', function() { }, transform(code, id) { - if (id.endsWith('.html')) { + if (id.endsWith('.svelte')) { const compiled = svelte.compile(code, { customElement: true, dev: config.dev diff --git a/test/custom-elements/samples/custom-method/test.js b/test/custom-elements/samples/custom-method/test.js index 2233f0b452..e274786079 100644 --- a/test/custom-elements/samples/custom-method/test.js +++ b/test/custom-elements/samples/custom-method/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/escaped-css/test.js b/test/custom-elements/samples/escaped-css/test.js index bd148ad5a7..3696ee8c1b 100644 --- a/test/custom-elements/samples/escaped-css/test.js +++ b/test/custom-elements/samples/escaped-css/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/html-slots/test.js b/test/custom-elements/samples/html-slots/test.js index 87cfd2029d..bb38a83eab 100644 --- a/test/custom-elements/samples/html-slots/test.js +++ b/test/custom-elements/samples/html-slots/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ` diff --git a/test/custom-elements/samples/html/test.js b/test/custom-elements/samples/html/test.js index 732d79f009..1638ead784 100644 --- a/test/custom-elements/samples/html/test.js +++ b/test/custom-elements/samples/html/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/nested.skip/test.js b/test/custom-elements/samples/nested.skip/test.js index d6d52426af..85320297ea 100644 --- a/test/custom-elements/samples/nested.skip/test.js +++ b/test/custom-elements/samples/nested.skip/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/new-styled/test.js b/test/custom-elements/samples/new-styled/test.js index 6bb37d7a2a..f027121009 100644 --- a/test/custom-elements/samples/new-styled/test.js +++ b/test/custom-elements/samples/new-styled/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { target.innerHTML = '

unstyled

'; diff --git a/test/custom-elements/samples/new/test.js b/test/custom-elements/samples/new/test.js index f37f4301fb..1137495e35 100644 --- a/test/custom-elements/samples/new/test.js +++ b/test/custom-elements/samples/new/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/no-missing-prop-warnings/test.js b/test/custom-elements/samples/no-missing-prop-warnings/test.js index 9430e97f3a..e7ced25e19 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/test.js +++ b/test/custom-elements/samples/no-missing-prop-warnings/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { const warnings = []; diff --git a/test/custom-elements/samples/oncreate/test.js b/test/custom-elements/samples/oncreate/test.js index a64a8c9fec..11d76078f2 100644 --- a/test/custom-elements/samples/oncreate/test.js +++ b/test/custom-elements/samples/oncreate/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/props/test.js b/test/custom-elements/samples/props/test.js index 1e95fe3ad2..9c7e44c3a3 100644 --- a/test/custom-elements/samples/props/test.js +++ b/test/custom-elements/samples/props/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/helpers.js b/test/helpers.js index f2e2004f09..b7064c99eb 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -171,7 +171,7 @@ export function addLineNumbers(code) { } export function showOutput(cwd, options = {}, compile = svelte.compile) { - glob('**/*.html', { cwd }).forEach(file => { + glob('**/*.svelte', { cwd }).forEach(file => { if (file[0] === '_') return; const { js } = compile( diff --git a/test/hydration/index.js b/test/hydration/index.js index 8b66937329..24c61fb56a 100644 --- a/test/hydration/index.js +++ b/test/hydration/index.js @@ -18,7 +18,7 @@ describe('hydration', () => { before(() => { const svelte = loadSvelte(); - require.extensions['.html'] = function(module, filename) { + require.extensions['.svelte'] = function(module, filename) { const options = Object.assign( { filename, @@ -62,7 +62,7 @@ describe('hydration', () => { let SvelteComponent; try { - SvelteComponent = require(`${cwd}/main.html`).default; + SvelteComponent = require(`${cwd}/main.svelte`).default; } catch (err) { throw err; } diff --git a/test/hydration/samples/basic/_after.svelte b/test/hydration/samples/basic/_after.html similarity index 100% rename from test/hydration/samples/basic/_after.svelte rename to test/hydration/samples/basic/_after.html diff --git a/test/hydration/samples/basic/_before.svelte b/test/hydration/samples/basic/_before.html similarity index 100% rename from test/hydration/samples/basic/_before.svelte rename to test/hydration/samples/basic/_before.html diff --git a/test/hydration/samples/binding-input/_after.svelte b/test/hydration/samples/binding-input/_after.html similarity index 100% rename from test/hydration/samples/binding-input/_after.svelte rename to test/hydration/samples/binding-input/_after.html diff --git a/test/hydration/samples/binding-input/_before.svelte b/test/hydration/samples/binding-input/_before.html similarity index 100% rename from test/hydration/samples/binding-input/_before.svelte rename to test/hydration/samples/binding-input/_before.html diff --git a/test/hydration/samples/component-in-element/_after.svelte b/test/hydration/samples/component-in-element/_after.html similarity index 100% rename from test/hydration/samples/component-in-element/_after.svelte rename to test/hydration/samples/component-in-element/_after.html diff --git a/test/hydration/samples/component-in-element/_before.svelte b/test/hydration/samples/component-in-element/_before.html similarity index 100% rename from test/hydration/samples/component-in-element/_before.svelte rename to test/hydration/samples/component-in-element/_before.html diff --git a/test/hydration/samples/component/_after.svelte b/test/hydration/samples/component/_after.html similarity index 100% rename from test/hydration/samples/component/_after.svelte rename to test/hydration/samples/component/_after.html diff --git a/test/hydration/samples/component/_before.svelte b/test/hydration/samples/component/_before.html similarity index 100% rename from test/hydration/samples/component/_before.svelte rename to test/hydration/samples/component/_before.html diff --git a/test/hydration/samples/dynamic-text-changed/_after.svelte b/test/hydration/samples/dynamic-text-changed/_after.html similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_after.svelte rename to test/hydration/samples/dynamic-text-changed/_after.html diff --git a/test/hydration/samples/dynamic-text-changed/_before.svelte b/test/hydration/samples/dynamic-text-changed/_before.html similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_before.svelte rename to test/hydration/samples/dynamic-text-changed/_before.html diff --git a/test/hydration/samples/dynamic-text/_after.svelte b/test/hydration/samples/dynamic-text/_after.html similarity index 100% rename from test/hydration/samples/dynamic-text/_after.svelte rename to test/hydration/samples/dynamic-text/_after.html diff --git a/test/hydration/samples/dynamic-text/_before.svelte b/test/hydration/samples/dynamic-text/_before.html similarity index 100% rename from test/hydration/samples/dynamic-text/_before.svelte rename to test/hydration/samples/dynamic-text/_before.html diff --git a/test/hydration/samples/each-block-arg-clash/_after.svelte b/test/hydration/samples/each-block-arg-clash/_after.html similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_after.svelte rename to test/hydration/samples/each-block-arg-clash/_after.html diff --git a/test/hydration/samples/each-block-arg-clash/_before.svelte b/test/hydration/samples/each-block-arg-clash/_before.html similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_before.svelte rename to test/hydration/samples/each-block-arg-clash/_before.html diff --git a/test/hydration/samples/each-block/_after.svelte b/test/hydration/samples/each-block/_after.html similarity index 100% rename from test/hydration/samples/each-block/_after.svelte rename to test/hydration/samples/each-block/_after.html diff --git a/test/hydration/samples/each-block/_before.svelte b/test/hydration/samples/each-block/_before.html similarity index 100% rename from test/hydration/samples/each-block/_before.svelte rename to test/hydration/samples/each-block/_before.html diff --git a/test/hydration/samples/element-attribute-added/_after.svelte b/test/hydration/samples/element-attribute-added/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-added/_after.svelte rename to test/hydration/samples/element-attribute-added/_after.html diff --git a/test/hydration/samples/element-attribute-added/_before.svelte b/test/hydration/samples/element-attribute-added/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-added/_before.svelte rename to test/hydration/samples/element-attribute-added/_before.html diff --git a/test/hydration/samples/element-attribute-changed/_after.svelte b/test/hydration/samples/element-attribute-changed/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-changed/_after.svelte rename to test/hydration/samples/element-attribute-changed/_after.html diff --git a/test/hydration/samples/element-attribute-changed/_before.svelte b/test/hydration/samples/element-attribute-changed/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-changed/_before.svelte rename to test/hydration/samples/element-attribute-changed/_before.html diff --git a/test/hydration/samples/element-attribute-removed/_after.svelte b/test/hydration/samples/element-attribute-removed/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-removed/_after.svelte rename to test/hydration/samples/element-attribute-removed/_after.html diff --git a/test/hydration/samples/element-attribute-removed/_before.svelte b/test/hydration/samples/element-attribute-removed/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-removed/_before.svelte rename to test/hydration/samples/element-attribute-removed/_before.html diff --git a/test/hydration/samples/element-attribute-unchanged/_after.svelte b/test/hydration/samples/element-attribute-unchanged/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_after.svelte rename to test/hydration/samples/element-attribute-unchanged/_after.html diff --git a/test/hydration/samples/element-attribute-unchanged/_before.svelte b/test/hydration/samples/element-attribute-unchanged/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_before.svelte rename to test/hydration/samples/element-attribute-unchanged/_before.html diff --git a/test/hydration/samples/element-nested/_after.svelte b/test/hydration/samples/element-nested/_after.html similarity index 100% rename from test/hydration/samples/element-nested/_after.svelte rename to test/hydration/samples/element-nested/_after.html diff --git a/test/hydration/samples/element-nested/_before.svelte b/test/hydration/samples/element-nested/_before.html similarity index 100% rename from test/hydration/samples/element-nested/_before.svelte rename to test/hydration/samples/element-nested/_before.html diff --git a/test/hydration/samples/element-ref/_after.svelte b/test/hydration/samples/element-ref/_after.html similarity index 100% rename from test/hydration/samples/element-ref/_after.svelte rename to test/hydration/samples/element-ref/_after.html diff --git a/test/hydration/samples/element-ref/_before.svelte b/test/hydration/samples/element-ref/_before.html similarity index 100% rename from test/hydration/samples/element-ref/_before.svelte rename to test/hydration/samples/element-ref/_before.html diff --git a/test/hydration/samples/event-handler/_after.svelte b/test/hydration/samples/event-handler/_after.html similarity index 100% rename from test/hydration/samples/event-handler/_after.svelte rename to test/hydration/samples/event-handler/_after.html diff --git a/test/hydration/samples/event-handler/_before.svelte b/test/hydration/samples/event-handler/_before.html similarity index 100% rename from test/hydration/samples/event-handler/_before.svelte rename to test/hydration/samples/event-handler/_before.html diff --git a/test/hydration/samples/if-block-anchor/_after.svelte b/test/hydration/samples/if-block-anchor/_after.html similarity index 100% rename from test/hydration/samples/if-block-anchor/_after.svelte rename to test/hydration/samples/if-block-anchor/_after.html diff --git a/test/hydration/samples/if-block-anchor/_before.svelte b/test/hydration/samples/if-block-anchor/_before.html similarity index 100% rename from test/hydration/samples/if-block-anchor/_before.svelte rename to test/hydration/samples/if-block-anchor/_before.html diff --git a/test/hydration/samples/if-block-false/_after.svelte b/test/hydration/samples/if-block-false/_after.html similarity index 100% rename from test/hydration/samples/if-block-false/_after.svelte rename to test/hydration/samples/if-block-false/_after.html diff --git a/test/hydration/samples/if-block-false/_before.svelte b/test/hydration/samples/if-block-false/_before.html similarity index 100% rename from test/hydration/samples/if-block-false/_before.svelte rename to test/hydration/samples/if-block-false/_before.html diff --git a/test/hydration/samples/if-block-update/_after.svelte b/test/hydration/samples/if-block-update/_after.html similarity index 100% rename from test/hydration/samples/if-block-update/_after.svelte rename to test/hydration/samples/if-block-update/_after.html diff --git a/test/hydration/samples/if-block-update/_before.svelte b/test/hydration/samples/if-block-update/_before.html similarity index 100% rename from test/hydration/samples/if-block-update/_before.svelte rename to test/hydration/samples/if-block-update/_before.html diff --git a/test/hydration/samples/if-block/_after.svelte b/test/hydration/samples/if-block/_after.html similarity index 100% rename from test/hydration/samples/if-block/_after.svelte rename to test/hydration/samples/if-block/_after.html diff --git a/test/hydration/samples/if-block/_before.svelte b/test/hydration/samples/if-block/_before.html similarity index 100% rename from test/hydration/samples/if-block/_before.svelte rename to test/hydration/samples/if-block/_before.html diff --git a/test/hydration/samples/raw/_after.svelte b/test/hydration/samples/raw/_after.html similarity index 100% rename from test/hydration/samples/raw/_after.svelte rename to test/hydration/samples/raw/_after.html diff --git a/test/hydration/samples/raw/_before.svelte b/test/hydration/samples/raw/_before.html similarity index 100% rename from test/hydration/samples/raw/_before.svelte rename to test/hydration/samples/raw/_before.html diff --git a/test/hydration/samples/top-level-text/_after.svelte b/test/hydration/samples/top-level-text/_after.html similarity index 100% rename from test/hydration/samples/top-level-text/_after.svelte rename to test/hydration/samples/top-level-text/_after.html diff --git a/test/hydration/samples/top-level-text/_before.svelte b/test/hydration/samples/top-level-text/_before.html similarity index 100% rename from test/hydration/samples/top-level-text/_before.svelte rename to test/hydration/samples/top-level-text/_before.html diff --git a/test/js/index.js b/test/js/index.js index d6cb71e416..77da160591 100644 --- a/test/js/index.js +++ b/test/js/index.js @@ -18,7 +18,7 @@ describe("js", () => { dir = path.resolve("test/js/samples", dir); const config = loadConfig(`${dir}/_config.js`); - const input = fs.readFileSync(`${dir}/input.html`, "utf-8").replace(/\s+$/, ""); + const input = fs.readFileSync(`${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); let actual; diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index f4304f53ef..c7a82698c2 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,6 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -import LazyLoad from "./LazyLoad.html"; +import LazyLoad from "./LazyLoad.svelte"; function create_fragment(ctx) { var current; @@ -38,7 +38,7 @@ function create_fragment(ctx) { } function func() { - return import('./Foo.html'); + return import('./Foo.svelte'); } class SvelteComponent extends SvelteComponent_1 { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index b79dd60512..ee31f589ea 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,6 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; -import Imported from "Imported.html"; +import Imported from "Imported.svelte"; function create_fragment(ctx) { var text, current; diff --git a/test/parser/index.js b/test/parser/index.js index 900cc3ae05..990a8751ef 100644 --- a/test/parser/index.js +++ b/test/parser/index.js @@ -18,7 +18,7 @@ describe('parse', () => { (solo ? it.only : it)(dir, () => { const options = tryToLoadJson(`test/parser/samples/${dir}/options.json`) || {}; - const input = fs.readFileSync(`test/parser/samples/${dir}/input.html`, 'utf-8').replace(/\s+$/, ''); + const input = fs.readFileSync(`test/parser/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, ''); const expectedOutput = tryToLoadJson(`test/parser/samples/${dir}/output.json`); const expectedError = tryToLoadJson(`test/parser/samples/${dir}/error.json`); diff --git a/test/preprocess/index.js b/test/preprocess/index.js index fddc14ec94..8d114ab7b3 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -13,8 +13,8 @@ describe('preprocess', () => { } (config.skip ? it.skip : config.solo ? it.only : it)(dir, async () => { - const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.html`, 'utf-8'); - const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.html`, 'utf-8'); + const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.svelte`, 'utf-8'); + const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.svelte`, 'utf-8'); const result = await svelte.preprocess(input, config.preprocess); fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, result.code); diff --git a/test/preprocess/samples/filename/_config.js b/test/preprocess/samples/filename/_config.js index d7a3c19770..c71cdafcac 100644 --- a/test/preprocess/samples/filename/_config.js +++ b/test/preprocess/samples/filename/_config.js @@ -1,6 +1,6 @@ export default { preprocess: { - filename: 'file.html', + filename: 'file.svelte', markup: ({ content, filename }) => { return { code: content.replace('__MARKUP_FILENAME__', filename) diff --git a/test/preprocess/samples/filename/output.svelte b/test/preprocess/samples/filename/output.svelte index 1dcf67cc00..9eece2e222 100644 --- a/test/preprocess/samples/filename/output.svelte +++ b/test/preprocess/samples/filename/output.svelte @@ -1,3 +1,3 @@ -

Hello file.html!

- +

Hello file.svelte!

+ \ No newline at end of file diff --git a/test/runtime/index.js b/test/runtime/index.js index cd9a2a4946..002ca2605f 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -27,7 +27,7 @@ describe("runtime", () => { svelte = loadSvelte(false); svelte$ = loadSvelte(true); - require.extensions[".html"] = function(module, filename) { + require.extensions[".svelte"] = function(module, filename) { const options = Object.assign({ filename, format: 'cjs', @@ -74,7 +74,7 @@ describe("runtime", () => { compileOptions.immutable = config.immutable; Object.keys(require.cache) - .filter(x => x.endsWith(".html")) + .filter(x => x.endsWith(".svelte")) .forEach(file => { delete require.cache[file]; }); @@ -111,7 +111,7 @@ describe("runtime", () => { }; try { - mod = require(`./samples/${dir}/main.html`); + mod = require(`./samples/${dir}/main.svelte`); SvelteComponent = mod.default; } catch (err) { showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console diff --git a/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte b/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte index 0edb702f10..9b55ab769d 100644 --- a/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte +++ b/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/test/runtime/samples/component-binding-deep-b/_config.js b/test/runtime/samples/component-binding-deep-b/_config.js index f701a36fac..5adee6eac1 100644 --- a/test/runtime/samples/component-binding-deep-b/_config.js +++ b/test/runtime/samples/component-binding-deep-b/_config.js @@ -21,8 +21,8 @@ export default { html: ` @@ -40,8 +40,8 @@ export default { assert.equal(component.compiled, 'ONE SOURCE CHANGED\nTWO SOURCE'); assert.htmlEqual(target.innerHTML, ` @@ -70,8 +70,8 @@ export default { assert.equal(component.compiled, 'ONE SOURCE CHANGED\nTWO SOURCE CHANGED'); assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js index 7733688f23..61ae36d107 100644 --- a/test/runtime/samples/element-source-location/_config.js +++ b/test/runtime/samples/element-source-location/_config.js @@ -10,14 +10,14 @@ export default { const p = target.querySelector('p'); assert.deepEqual(h1.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'main.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'main.svelte')), line: 4, column: 0, - char: 51 + char: 53 }); assert.deepEqual(p.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.svelte')), line: 1, column: 1, char: 7 diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index a23936bba3..6a546b0b7b 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -46,15 +46,7 @@ describe("ssr", () => { (solo ? it.only : it)(dir, () => { dir = path.resolve("test/server-side-rendering/samples", dir); try { - let Component; - - const mainHtmlFile = `${dir}/main.html`; - const mainSvelteFile = `${dir}/main.svelte`; - if (fs.existsSync(mainHtmlFile)) { - Component = require(mainHtmlFile).default; - } else if (fs.existsSync(mainSvelteFile)) { - Component = require(mainSvelteFile).default; - } + const Component = require(`${dir}/main.svelte`).default; const expectedHtml = tryToReadFile(`${dir}/_expected.html`); const expectedCss = tryToReadFile(`${dir}/_expected.css`) || ""; @@ -104,7 +96,7 @@ describe("ssr", () => { (config.skip ? it.skip : config.solo ? it.only : it)(dir, () => { const cwd = path.resolve("test/runtime/samples", dir); - glob('**/*.html', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { + glob('**/*.svelte', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { const resolved = require.resolve(`../runtime/samples/${dir}/${file}`); delete require.cache[resolved]; }); @@ -118,7 +110,7 @@ describe("ssr", () => { try { if (config.before_test) config.before_test(); - const Component = require(`../runtime/samples/${dir}/main.html`).default; + const Component = require(`../runtime/samples/${dir}/main.svelte`).default; const { html } = Component.render(config.props, { store: (config.store !== true) && config.store }); diff --git a/test/server-side-rendering/samples/attribute-boolean/_expected.svelte b/test/server-side-rendering/samples/attribute-boolean/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-boolean/_expected.svelte rename to test/server-side-rendering/samples/attribute-boolean/_expected.html diff --git a/test/server-side-rendering/samples/attribute-dynamic/_expected.svelte b/test/server-side-rendering/samples/attribute-dynamic/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-dynamic/_expected.svelte rename to test/server-side-rendering/samples/attribute-dynamic/_expected.html diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte b/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte rename to test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte b/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte rename to test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html diff --git a/test/server-side-rendering/samples/attribute-static/_expected.svelte b/test/server-side-rendering/samples/attribute-static/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-static/_expected.svelte rename to test/server-side-rendering/samples/attribute-static/_expected.html diff --git a/test/server-side-rendering/samples/bindings/_expected.svelte b/test/server-side-rendering/samples/bindings/_expected.html similarity index 100% rename from test/server-side-rendering/samples/bindings/_expected.svelte rename to test/server-side-rendering/samples/bindings/_expected.html diff --git a/test/server-side-rendering/samples/comment/_expected.svelte b/test/server-side-rendering/samples/comment/_expected.html similarity index 100% rename from test/server-side-rendering/samples/comment/_expected.svelte rename to test/server-side-rendering/samples/comment/_expected.html diff --git a/test/server-side-rendering/samples/component-binding-renamed/_expected.svelte b/test/server-side-rendering/samples/component-binding-renamed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-binding-renamed/_expected.svelte rename to test/server-side-rendering/samples/component-binding-renamed/_expected.html diff --git a/test/server-side-rendering/samples/component-binding/_expected.svelte b/test/server-side-rendering/samples/component-binding/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-binding/_expected.svelte rename to test/server-side-rendering/samples/component-binding/_expected.html diff --git a/test/server-side-rendering/samples/component-data-dynamic/_expected.svelte b/test/server-side-rendering/samples/component-data-dynamic/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-data-dynamic/_expected.svelte rename to test/server-side-rendering/samples/component-data-dynamic/_expected.html diff --git a/test/server-side-rendering/samples/component-data-empty/_expected.svelte b/test/server-side-rendering/samples/component-data-empty/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-data-empty/_expected.svelte rename to test/server-side-rendering/samples/component-data-empty/_expected.html diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte b/test/server-side-rendering/samples/component-refs-and-attributes/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte rename to test/server-side-rendering/samples/component-refs-and-attributes/_expected.html diff --git a/test/server-side-rendering/samples/component-refs/_expected.svelte b/test/server-side-rendering/samples/component-refs/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-refs/_expected.svelte rename to test/server-side-rendering/samples/component-refs/_expected.html diff --git a/test/server-side-rendering/samples/component-with-different-extension/_expected.svelte b/test/server-side-rendering/samples/component-with-different-extension/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-with-different-extension/_expected.svelte rename to test/server-side-rendering/samples/component-with-different-extension/_expected.html diff --git a/test/server-side-rendering/samples/component-yield/_expected.svelte b/test/server-side-rendering/samples/component-yield/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-yield/_expected.svelte rename to test/server-side-rendering/samples/component-yield/_expected.html diff --git a/test/server-side-rendering/samples/component/_expected.svelte b/test/server-side-rendering/samples/component/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component/_expected.svelte rename to test/server-side-rendering/samples/component/_expected.html diff --git a/test/server-side-rendering/samples/computed/_expected.svelte b/test/server-side-rendering/samples/computed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/computed/_expected.svelte rename to test/server-side-rendering/samples/computed/_expected.html diff --git a/test/server-side-rendering/samples/default-data-override/_expected.svelte b/test/server-side-rendering/samples/default-data-override/_expected.html similarity index 100% rename from test/server-side-rendering/samples/default-data-override/_expected.svelte rename to test/server-side-rendering/samples/default-data-override/_expected.html diff --git a/test/server-side-rendering/samples/default-data/_expected.svelte b/test/server-side-rendering/samples/default-data/_expected.html similarity index 100% rename from test/server-side-rendering/samples/default-data/_expected.svelte rename to test/server-side-rendering/samples/default-data/_expected.html diff --git a/test/server-side-rendering/samples/directives/_expected.svelte b/test/server-side-rendering/samples/directives/_expected.html similarity index 100% rename from test/server-side-rendering/samples/directives/_expected.svelte rename to test/server-side-rendering/samples/directives/_expected.html diff --git a/test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte b/test/server-side-rendering/samples/dynamic-text-escaped/_expected.html similarity index 100% rename from test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte rename to test/server-side-rendering/samples/dynamic-text-escaped/_expected.html diff --git a/test/server-side-rendering/samples/dynamic-text/_expected.svelte b/test/server-side-rendering/samples/dynamic-text/_expected.html similarity index 100% rename from test/server-side-rendering/samples/dynamic-text/_expected.svelte rename to test/server-side-rendering/samples/dynamic-text/_expected.html diff --git a/test/server-side-rendering/samples/each-block/_expected.svelte b/test/server-side-rendering/samples/each-block/_expected.html similarity index 100% rename from test/server-side-rendering/samples/each-block/_expected.svelte rename to test/server-side-rendering/samples/each-block/_expected.html diff --git a/test/server-side-rendering/samples/empty-elements-closed/_expected.svelte b/test/server-side-rendering/samples/empty-elements-closed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/empty-elements-closed/_expected.svelte rename to test/server-side-rendering/samples/empty-elements-closed/_expected.html diff --git a/test/server-side-rendering/samples/entities/_expected.svelte b/test/server-side-rendering/samples/entities/_expected.html similarity index 100% rename from test/server-side-rendering/samples/entities/_expected.svelte rename to test/server-side-rendering/samples/entities/_expected.html diff --git a/test/server-side-rendering/samples/head-title/_expected-head.svelte b/test/server-side-rendering/samples/head-title/_expected-head.html similarity index 100% rename from test/server-side-rendering/samples/head-title/_expected-head.svelte rename to test/server-side-rendering/samples/head-title/_expected-head.html diff --git a/test/server-side-rendering/samples/head-title/_expected.svelte b/test/server-side-rendering/samples/head-title/_expected.html similarity index 100% rename from test/server-side-rendering/samples/head-title/_expected.svelte rename to test/server-side-rendering/samples/head-title/_expected.html diff --git a/test/server-side-rendering/samples/helpers/_expected.svelte b/test/server-side-rendering/samples/helpers/_expected.html similarity index 100% rename from test/server-side-rendering/samples/helpers/_expected.svelte rename to test/server-side-rendering/samples/helpers/_expected.html diff --git a/test/server-side-rendering/samples/if-block-false/_expected.svelte b/test/server-side-rendering/samples/if-block-false/_expected.html similarity index 100% rename from test/server-side-rendering/samples/if-block-false/_expected.svelte rename to test/server-side-rendering/samples/if-block-false/_expected.html diff --git a/test/server-side-rendering/samples/if-block-true/_expected.svelte b/test/server-side-rendering/samples/if-block-true/_expected.html similarity index 100% rename from test/server-side-rendering/samples/if-block-true/_expected.svelte rename to test/server-side-rendering/samples/if-block-true/_expected.html diff --git a/test/server-side-rendering/samples/import-non-component/_expected.svelte b/test/server-side-rendering/samples/import-non-component/_expected.html similarity index 100% rename from test/server-side-rendering/samples/import-non-component/_expected.svelte rename to test/server-side-rendering/samples/import-non-component/_expected.html diff --git a/test/server-side-rendering/samples/raw-mustaches/_expected.svelte b/test/server-side-rendering/samples/raw-mustaches/_expected.html similarity index 100% rename from test/server-side-rendering/samples/raw-mustaches/_expected.svelte rename to test/server-side-rendering/samples/raw-mustaches/_expected.html diff --git a/test/server-side-rendering/samples/sanitize-name/_expected.svelte b/test/server-side-rendering/samples/sanitize-name/_expected.html similarity index 100% rename from test/server-side-rendering/samples/sanitize-name/_expected.svelte rename to test/server-side-rendering/samples/sanitize-name/_expected.html diff --git a/test/server-side-rendering/samples/static-div/_expected.svelte b/test/server-side-rendering/samples/static-div/_expected.html similarity index 100% rename from test/server-side-rendering/samples/static-div/_expected.svelte rename to test/server-side-rendering/samples/static-div/_expected.html diff --git a/test/server-side-rendering/samples/static-text/_expected.svelte b/test/server-side-rendering/samples/static-text/_expected.html similarity index 100% rename from test/server-side-rendering/samples/static-text/_expected.svelte rename to test/server-side-rendering/samples/static-text/_expected.html diff --git a/test/server-side-rendering/samples/styles-nested/_expected.svelte b/test/server-side-rendering/samples/styles-nested/_expected.html similarity index 100% rename from test/server-side-rendering/samples/styles-nested/_expected.svelte rename to test/server-side-rendering/samples/styles-nested/_expected.html diff --git a/test/server-side-rendering/samples/styles/_expected.svelte b/test/server-side-rendering/samples/styles/_expected.html similarity index 100% rename from test/server-side-rendering/samples/styles/_expected.svelte rename to test/server-side-rendering/samples/styles/_expected.html diff --git a/test/server-side-rendering/samples/textarea-children/_expected.svelte b/test/server-side-rendering/samples/textarea-children/_expected.html similarity index 100% rename from test/server-side-rendering/samples/textarea-children/_expected.svelte rename to test/server-side-rendering/samples/textarea-children/_expected.html diff --git a/test/server-side-rendering/samples/textarea-value/_expected.svelte b/test/server-side-rendering/samples/textarea-value/_expected.html similarity index 100% rename from test/server-side-rendering/samples/textarea-value/_expected.svelte rename to test/server-side-rendering/samples/textarea-value/_expected.html diff --git a/test/server-side-rendering/samples/triple/_expected.svelte b/test/server-side-rendering/samples/triple/_expected.html similarity index 100% rename from test/server-side-rendering/samples/triple/_expected.svelte rename to test/server-side-rendering/samples/triple/_expected.html diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index 7bdcaa7f41..79028719b9 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -21,7 +21,7 @@ describe("sourcemaps", () => { const config = loadConfig(`./sourcemaps/samples/${dir}/_config.js`); const filename = path.resolve( - `test/sourcemaps/samples/${dir}/input.html` + `test/sourcemaps/samples/${dir}/input.svelte` ); const outputFilename = path.resolve( `test/sourcemaps/samples/${dir}/output` @@ -56,8 +56,8 @@ describe("sourcemaps", () => { ); } - assert.deepEqual(js.map.sources, ["input.html"]); - if (css.map) assert.deepEqual(css.map.sources, ["input.html"]); + assert.deepEqual(js.map.sources, ["input.svelte"]); + if (css.map) assert.deepEqual(css.map.sources, ["input.svelte"]); const { test } = require(`./samples/${dir}/test.js`); diff --git a/test/sourcemaps/samples/basic/test.js b/test/sourcemaps/samples/basic/test.js index f0680b7351..f13ff5d0e1 100644 --- a/test/sourcemaps/samples/basic/test.js +++ b/test/sourcemaps/samples/basic/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding-shorthand.skip/test.js b/test/sourcemaps/samples/binding-shorthand.skip/test.js index 8c2216ead5..cdfbbdc091 100644 --- a/test/sourcemaps/samples/binding-shorthand.skip/test.js +++ b/test/sourcemaps/samples/binding-shorthand.skip/test.js @@ -13,7 +13,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding/test.js b/test/sourcemaps/samples/binding/test.js index a0750d89a1..31c0e98442 100644 --- a/test/sourcemaps/samples/binding/test.js +++ b/test/sourcemaps/samples/binding/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/css/test.js b/test/sourcemaps/samples/css/test.js index c1f55612eb..54082bd4ee 100644 --- a/test/sourcemaps/samples/css/test.js +++ b/test/sourcemaps/samples/css/test.js @@ -9,7 +9,7 @@ export function test({ assert, smcCss, locateInSource, locateInGeneratedCss }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/each-block/test.js b/test/sourcemaps/samples/each-block/test.js index b0c1eb9583..6e9d2d70b0 100644 --- a/test/sourcemaps/samples/each-block/test.js +++ b/test/sourcemaps/samples/each-block/test.js @@ -10,7 +10,7 @@ export function test({ assert, code, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/script/test.js b/test/sourcemaps/samples/script/test.js index 87818fef09..73971ef487 100644 --- a/test/sourcemaps/samples/script/test.js +++ b/test/sourcemaps/samples/script/test.js @@ -8,7 +8,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/static-no-script/test.js b/test/sourcemaps/samples/static-no-script/test.js index d4b66d9abc..a8f4d89ab8 100644 --- a/test/sourcemaps/samples/static-no-script/test.js +++ b/test/sourcemaps/samples/static-no-script/test.js @@ -2,8 +2,8 @@ const fs = require( 'fs' ); const path = require( 'path' ); export function test({ assert, map }) { - assert.deepEqual( map.sources, [ 'input.html' ]); + assert.deepEqual( map.sources, [ 'input.svelte' ]); assert.deepEqual( map.sourcesContent, [ - fs.readFileSync( path.join( __dirname, 'input.html' ), 'utf-8' ) + fs.readFileSync( path.join( __dirname, 'input.svelte' ), 'utf-8' ) ]); } diff --git a/test/stats/index.js b/test/stats/index.js index e0b114dd9a..fe4c2ac55b 100644 --- a/test/stats/index.js +++ b/test/stats/index.js @@ -16,7 +16,7 @@ describe('stats', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./stats/samples/${dir}/_config.js`); - const filename = `test/stats/samples/${dir}/input.html`; + const filename = `test/stats/samples/${dir}/input.svelte`; const input = fs.readFileSync(filename, 'utf-8').replace(/\s+$/, ''); const expectedWarnings = diff --git a/test/validator/index.js b/test/validator/index.js index 517427e817..f10024b86c 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -17,7 +17,7 @@ describe("validate", () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./validator/samples/${dir}/_config.js`); - const input = fs.readFileSync(`test/validator/samples/${dir}/input.html`, "utf-8").replace(/\s+$/, ""); + const input = fs.readFileSync(`test/validator/samples/${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); const expectedWarnings = tryToLoadJson(`test/validator/samples/${dir}/warnings.json`) || []; const expectedErrors = tryToLoadJson(`test/validator/samples/${dir}/errors.json`); diff --git a/test/validator/samples/a11y-not-on-components/warnings.json b/test/validator/samples/a11y-not-on-components/warnings.json index 7e17fda95a..4d8fb62182 100644 --- a/test/validator/samples/a11y-not-on-components/warnings.json +++ b/test/validator/samples/a11y-not-on-components/warnings.json @@ -5,13 +5,13 @@ "start": { "column": 8, "line": 6, - "character": 86 + "character": 88 }, "end": { "line": 6, "column": 17, - "character": 95 + "character": 97 }, - "pos": 86 + "pos": 88 } ] diff --git a/test/validator/samples/action-on-component/errors.json b/test/validator/samples/action-on-component/errors.json index 596ef16482..7ffaeb45fd 100644 --- a/test/validator/samples/action-on-component/errors.json +++ b/test/validator/samples/action-on-component/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-action", "message": "Actions can only be applied to DOM elements, not components", - "pos": 84, + "pos": 86, "start": { "line": 7, "column": 8, - "character": 84 + "character": 86 }, "end": { "line": 7, "column": 15, - "character": 91 + "character": 93 } }] \ No newline at end of file diff --git a/test/validator/samples/component-slot-dynamic-attribute/errors.json b/test/validator/samples/component-slot-dynamic-attribute/errors.json index 6108b89bfb..8944f9cd3e 100644 --- a/test/validator/samples/component-slot-dynamic-attribute/errors.json +++ b/test/validator/samples/component-slot-dynamic-attribute/errors.json @@ -4,12 +4,12 @@ "start": { "line": 6, "column": 9, - "character": 75 + "character": 77 }, "end": { "line": 6, "column": 19, - "character": 85 + "character": 87 }, - "pos": 75 + "pos": 77 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-each-block/errors.json b/test/validator/samples/component-slotted-each-block/errors.json index b2ae858fb6..89f394bca4 100644 --- a/test/validator/samples/component-slotted-each-block/errors.json +++ b/test/validator/samples/component-slotted-each-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 98 + "character": 100 }, "end": { "line": 7, "column": 17, - "character": 108 + "character": 110 }, - "pos": 98 + "pos": 100 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-if-block/errors.json b/test/validator/samples/component-slotted-if-block/errors.json index bd3ef87fad..ab35a77fce 100644 --- a/test/validator/samples/component-slotted-if-block/errors.json +++ b/test/validator/samples/component-slotted-if-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 86 + "character": 88 }, "end": { "line": 7, "column": 17, - "character": 96 + "character": 98 }, - "pos": 86 + "pos": 88 }] \ No newline at end of file diff --git a/test/validator/samples/prop-slot/errors.json b/test/validator/samples/prop-slot/errors.json index 01e864b542..4fbfa3935c 100644 --- a/test/validator/samples/prop-slot/errors.json +++ b/test/validator/samples/prop-slot/errors.json @@ -4,12 +4,12 @@ "start": { "line": 5, "column": 8, - "character": 65 + "character": 67 }, "end": { "line": 5, "column": 18, - "character": 75 + "character": 77 }, - "pos": 65 + "pos": 67 }] diff --git a/test/validator/samples/transition-on-component/errors.json b/test/validator/samples/transition-on-component/errors.json index bee8bf7539..400539f8e6 100644 --- a/test/validator/samples/transition-on-component/errors.json +++ b/test/validator/samples/transition-on-component/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 8, - "character": 85 + "character": 87 }, "end": { "line": 7, "column": 14, - "character": 91 + "character": 93 }, - "pos": 85 + "pos": 87 }] \ No newline at end of file