diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index a69400f8e3..c6fd5c8b2d 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -7,7 +7,7 @@ title: Template syntax --- -A lowercase tag, like `
`, denotes a regular HTML element. A capitalised tag, such as ``, indicates a *component*. +A lowercase tag, like `
`, denotes a regular HTML element. A capitalised tag, such as `` or ``, indicates a *component*. ```html + +

foo {foo}

\ No newline at end of file diff --git a/test/runtime/samples/component-namespaced/_config.js b/test/runtime/samples/component-namespaced/_config.js new file mode 100644 index 0000000000..e5f4c680da --- /dev/null +++ b/test/runtime/samples/component-namespaced/_config.js @@ -0,0 +1,16 @@ +export default { + props: { + a: 1 + }, + + html: ` +

foo 1

+ `, + + test({ assert, component, target }) { + component.a = 2; + assert.htmlEqual(target.innerHTML, ` +

foo 2

+ `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/component-namespaced/components.js b/test/runtime/samples/component-namespaced/components.js new file mode 100644 index 0000000000..832d2412ee --- /dev/null +++ b/test/runtime/samples/component-namespaced/components.js @@ -0,0 +1,3 @@ +import Foo from './Foo.svelte'; + +export default { Foo }; \ No newline at end of file diff --git a/test/runtime/samples/component-namespaced/main.svelte b/test/runtime/samples/component-namespaced/main.svelte new file mode 100644 index 0000000000..541b68e47e --- /dev/null +++ b/test/runtime/samples/component-namespaced/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index 6a546b0b7b..2806a1b5c2 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -96,10 +96,11 @@ describe("ssr", () => { (config.skip ? it.skip : config.solo ? it.only : it)(dir, () => { const cwd = path.resolve("test/runtime/samples", dir); - glob('**/*.svelte', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { - const resolved = require.resolve(`../runtime/samples/${dir}/${file}`); - delete require.cache[resolved]; - }); + Object.keys(require.cache) + .filter(x => x.startsWith(cwd)) + .forEach(file => { + delete require.cache[file]; + }); const compileOptions = Object.assign({ sveltePath }, config.compileOptions, { generate: 'ssr'