mirror of https://github.com/sveltejs/svelte
parent
c19542b634
commit
e5c9c8f40f
@ -0,0 +1,7 @@
|
|||||||
|
export default {
|
||||||
|
error: `Function called outside component initialization`,
|
||||||
|
after_test() {
|
||||||
|
// clear cache for `svelte/internal`
|
||||||
|
delete require.cache[require.resolve(process.cwd() + '/internal')];
|
||||||
|
},
|
||||||
|
};
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
import { getContext, onMount } from 'svelte';
|
||||||
|
import { get_current_component } from 'svelte/internal';
|
||||||
|
onMount(() => {
|
||||||
|
get_current_component();
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in new issue