mirror of https://github.com/sveltejs/svelte
commit
ca6a4a7708
@ -0,0 +1,6 @@
|
||||
import { Validator } from '../../';
|
||||
import { Node } from '../../../interfaces';
|
||||
|
||||
export default function preload(validator: Validator, prop: Node) {
|
||||
// not sure there's anything we need to check here...
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
test(assert, component) {
|
||||
const Component = component.constructor;
|
||||
assert.deepEqual(Component.preload({ foo: 1 }), { bar: 2 });
|
||||
}
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
export default {
|
||||
preload({ foo }) {
|
||||
return {
|
||||
bar: foo * 2
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue