update some tests

This commit is contained in:
Rich Harris
2019-01-30 10:21:55 -05:00
parent c00af6dad0
commit da540ef15f
23 changed files with 255 additions and 251 deletions

View File

@@ -1,20 +1,18 @@
<span>z: {segment} {count}</span>
<a href="foo/bar/qux">click me</a>
<script>
<script context="module">
import counts from '../_counts.js';
export default {
preload() {
return {
count: counts.z += 1
};
},
export function preload() {
return {
count: counts.z += 1
};
}
</script>
oncreate() {
this.set({
segment: this.get().params.z
});
}
};
</script>
<script>
export let params;
export let count;
export let segment = params.z;
</script>
<span>z: {segment} {count}</span>
<a href="foo/bar/qux">click me</a>

View File

@@ -1,22 +1,21 @@
<script context="module">
import counts from '../_counts.js';
export function preload() {
return {
count: counts.y += 1
};
}
</script>
<script>
export let params;
export let count;
export let child;
export let segment = params.y;
</script>
<span>y: {segment} {count}</span>
<svelte:component this={child.component} {...child.props}/>
<span>child segment: {child.segment}</span>
<script>
import counts from '../_counts.js';
export default {
preload() {
return {
count: counts.y += 1
};
},
oncreate() {
this.set({
segment: this.get().params.y
});
}
};
</script>
<span>child segment: {child.segment}</span>