diff --git a/test/runtime/index.js b/test/runtime/index.js
index 96d7ad6445..913fddacf2 100644
--- a/test/runtime/index.js
+++ b/test/runtime/index.js
@@ -21,11 +21,11 @@ let compileOptions = null;
let compile = null;
function getName(filename) {
- const base = path.basename(filename).replace('-v2', '').replace(".html", "");
+ const base = path.basename(filename).replace(".html", "");
return base[0].toUpperCase() + base.slice(1);
}
-describe("runtime", () => {
+describe.only("runtime", () => {
before(() => {
svelte = loadSvelte(false);
svelte$ = loadSvelte(true);
@@ -46,7 +46,7 @@ describe("runtime", () => {
const failed = new Set();
- function runTest(dir, shared, hydrate, v2) {
+ function runTest(dir, shared, hydrate) {
if (dir[0] === ".") return;
const config = loadConfig(`./runtime/samples/${dir}/_config.js`);
@@ -55,7 +55,7 @@ describe("runtime", () => {
throw new Error("Forgot to remove `solo: true` from test");
}
- (config.skip ? it.skip : config.solo ? it.only : it)(`${dir} (${shared ? 'shared' : 'inline'} helpers${hydrate ? ', hydration' : ''}${v2 ? ', v2' : ''})`, () => {
+ (config.skip ? it.skip : config.solo ? it.only : it)(`${dir} (${shared ? 'shared' : 'inline'} helpers${hydrate ? ', hydration' : ''})`, () => {
if (failed.has(dir)) {
// this makes debugging easier, by only printing compiled output once
throw new Error('skipping test, already failed');
@@ -72,7 +72,7 @@ describe("runtime", () => {
compileOptions.dev = config.dev;
compileOptions.store = !!config.store;
compileOptions.immutable = config.immutable;
- compileOptions.parser = v2 ? 'v2' : 'v1';
+ compileOptions.parser = 'v2'; // TODO remove
Object.keys(require.cache)
.filter(x => x.endsWith(".html"))
@@ -112,7 +112,7 @@ describe("runtime", () => {
};
try {
- SvelteComponent = require(`./samples/${dir}/main${v2 ? '-v2' : ''}.html`);
+ SvelteComponent = require(`./samples/${dir}/main.html`);
} catch (err) {
showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate, store: !!compileOptions.store }, compile); // eslint-disable-line no-console
throw err;
@@ -172,12 +172,12 @@ describe("runtime", () => {
config.error(assert, err);
} else {
failed.add(dir);
- showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate, store: !!compileOptions.store, v2 }, compile); // eslint-disable-line no-console
+ showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate, store: !!compileOptions.store, v2: true }, compile); // eslint-disable-line no-console
throw err;
}
})
.then(() => {
- if (config.show) showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate, store: !!compileOptions.store, v2 }, compile);
+ if (config.show) showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate, store: !!compileOptions.store, v2: true }, compile);
});
});
}
@@ -187,10 +187,6 @@ describe("runtime", () => {
runTest(dir, shared, false);
runTest(dir, shared, true);
runTest(dir, null, false);
-
- if (fs.existsSync(`test/runtime/samples/${dir}/main-v2.html`)) {
- runTest(dir, shared, false, true);
- }
});
it("fails if options.target is missing in dev mode", () => {
diff --git a/test/runtime/samples/action-this/main.html b/test/runtime/samples/action-this/main.html
index 95da3d4a8c..6eb12e1206 100644
--- a/test/runtime/samples/action-this/main.html
+++ b/test/runtime/samples/action-this/main.html
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/test/runtime/samples/action-update/main.html b/test/runtime/samples/action-update/main.html
index 03bd0d0ef9..6b319f5dca 100644
--- a/test/runtime/samples/action-update/main.html
+++ b/test/runtime/samples/action-update/main.html
@@ -1,5 +1,5 @@
-<:Window on:keydown="checkForCtrl(event)" on:keyup="checkForCtrl(event)"/>
+
{{task.description}}
-{{/each}} \ No newline at end of file +{#each tasks.filter(t => !t.done) as task} +{task.description}
+{/each} \ No newline at end of file diff --git a/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html b/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html index dc385a4990..209cdbeaf7 100644 --- a/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html +++ b/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html @@ -1,13 +1,13 @@ -{{#each items as item}} -{{item.description}}
{item.description}
{{numCompleted}} completed
+{numCompleted} completed
diff --git a/test/runtime/samples/computed-function/main.html b/test/runtime/samples/computed-function/main.html index f3fc14727d..a432252166 100644 --- a/test/runtime/samples/computed-function/main.html +++ b/test/runtime/samples/computed-function/main.html @@ -1,4 +1,4 @@ -{{scale(x)}}
+{scale(x)}
\ No newline at end of file diff --git a/test/runtime/samples/computed-values-deconflicted/main.html b/test/runtime/samples/computed-values-deconflicted/main.html index d32fde6167..e5a016084c 100644 --- a/test/runtime/samples/computed-values-deconflicted/main.html +++ b/test/runtime/samples/computed-values-deconflicted/main.html @@ -1,4 +1,4 @@ -{{state}} +{state} \ No newline at end of file diff --git a/test/runtime/samples/computed-values-default/main-v2.html b/test/runtime/samples/computed-values-default/main-v2.html deleted file mode 100644 index b26762f3d8..0000000000 --- a/test/runtime/samples/computed-values-default/main-v2.html +++ /dev/null @@ -1,9 +0,0 @@ -{foo}
- - diff --git a/test/runtime/samples/computed-values-default/main.html b/test/runtime/samples/computed-values-default/main.html index 74292a3a2e..b26762f3d8 100644 --- a/test/runtime/samples/computed-values-default/main.html +++ b/test/runtime/samples/computed-values-default/main.html @@ -1,9 +1,9 @@ -{{foo}}
+{foo}
diff --git a/test/runtime/samples/computed-values-function-dependency/main-v2.html b/test/runtime/samples/computed-values-function-dependency/main-v2.html deleted file mode 100644 index adf66137fa..0000000000 --- a/test/runtime/samples/computed-values-function-dependency/main-v2.html +++ /dev/null @@ -1,28 +0,0 @@ -{x}
- - \ No newline at end of file diff --git a/test/runtime/samples/computed-values-function-dependency/main.html b/test/runtime/samples/computed-values-function-dependency/main.html index d385bf6da8..adf66137fa 100644 --- a/test/runtime/samples/computed-values-function-dependency/main.html +++ b/test/runtime/samples/computed-values-function-dependency/main.html @@ -1,4 +1,4 @@ -{{x}}
+{x}
diff --git a/test/runtime/samples/computed-values/main.html b/test/runtime/samples/computed-values/main.html index 0cee54f867..7e4f8d7728 100644 --- a/test/runtime/samples/computed-values/main.html +++ b/test/runtime/samples/computed-values/main.html @@ -1,5 +1,5 @@ -{{a}} + {{b}} = {{c}}
-{{c}} * {{c}} = {{cSquared}}
+{a} + {b} = {c}
+{c} * {c} = {cSquared}
diff --git a/test/runtime/samples/custom-method/main.html b/test/runtime/samples/custom-method/main.html index 3bd8459fb1..0f1ad3387c 100644 --- a/test/runtime/samples/custom-method/main.html +++ b/test/runtime/samples/custom-method/main.html @@ -1,6 +1,6 @@ -{{counter}}
+{counter}
diff --git a/test/runtime/samples/deconflict-template-1/main.html b/test/runtime/samples/deconflict-template-1/main.html index f4fe8de423..395d7b22b3 100644 --- a/test/runtime/samples/deconflict-template-1/main.html +++ b/test/runtime/samples/deconflict-template-1/main.html @@ -1,4 +1,4 @@ -{{value}} +{value} \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-dynamic-components-misplaced/main.html b/test/runtime/samples/dev-warning-dynamic-components-misplaced/main.html index 37392f27e6..eb6e7d8e8e 100644 --- a/test/runtime/samples/dev-warning-dynamic-components-misplaced/main.html +++ b/test/runtime/samples/dev-warning-dynamic-components-misplaced/main.html @@ -1,4 +1,4 @@ -<:Component {x ? Foo : Bar}/> +green {foo}
\ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated/Green.html index 692847c1c2..b4faa1b662 100644 --- a/test/runtime/samples/dynamic-component-bindings-recreated/Green.html +++ b/test/runtime/samples/dynamic-component-bindings-recreated/Green.html @@ -1 +1 @@ -green {{foo}}
\ No newline at end of file +green {foo}
\ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Red-v2.html b/test/runtime/samples/dynamic-component-bindings-recreated/Red-v2.html deleted file mode 100644 index a3e3c792a0..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated/Red-v2.html +++ /dev/null @@ -1 +0,0 @@ -red {foo}
\ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Red.html b/test/runtime/samples/dynamic-component-bindings-recreated/Red.html index 8f10e3294d..a3e3c792a0 100644 --- a/test/runtime/samples/dynamic-component-bindings-recreated/Red.html +++ b/test/runtime/samples/dynamic-component-bindings-recreated/Red.html @@ -1 +1 @@ -red {{foo}}
\ No newline at end of file +red {foo}
\ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/main-v2.html b/test/runtime/samples/dynamic-component-bindings-recreated/main-v2.html deleted file mode 100644 index 6d748ed217..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated/main-v2.html +++ /dev/null @@ -1,15 +0,0 @@ -element
- {{tag}} + {tag} - {{#if foo}} + {#if foo}foo
- {{elseif bar}} + {:elseif bar}bar
- {{else}} + {:else}neither foo nor bar
- {{/if}} + {/if} text - {{#each things as thing}} - {{thing}} - {{/each}} + {#each things as thing} + {thing} + {/each}{{foo}}
+{foo}
\ No newline at end of file diff --git a/test/runtime/samples/window-event-custom/main.html b/test/runtime/samples/window-event-custom/main.html index af33d08d97..515d5bc4ca 100644 --- a/test/runtime/samples/window-event-custom/main.html +++ b/test/runtime/samples/window-event-custom/main.html @@ -1,6 +1,6 @@ -<:Window on:esc="set({ escaped: true })" /> +escaped: {{escaped}}
+escaped: {escaped}