cypress-svelte-unit-test
cypress-svelte-unit-test copied to clipboard
External CSS won't get loaded
If there exists a CSS rollup config that separates the associated CSS into another file (as is done in default rollup template https://github.com/sveltejs/template/blob/master/rollup.config.js#L23-L25), the tests won't have access to the CSS
Workaround is to disable those lines in test mode.
Another workaround is to include the bundled CSS file while mounting the component:
mount(HelloWorld, {
props: {name: 'World'}
}, {
stylesheet: '/__root/public/build/bundle.css',
})