Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sveltekit compatibility #26

Open
michaeldesigaud opened this issue Mar 11, 2024 · 1 comment
Open

Sveltekit compatibility #26

michaeldesigaud opened this issue Mar 11, 2024 · 1 comment

Comments

@michaeldesigaud
Copy link

michaeldesigaud commented Mar 11, 2024

I try to use safetest in my sveltekit project but i struggle with the application boostrap in file /src/main.ts.
My entry point is an app.html file with the following :

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%sveltekit.assets%/favicon.png" />
    <meta name="viewport" content="width=device-width" />
    %sveltekit.head%
  </head>
  <body data-sveltekit-preload-data="hover">
    <div style="display: contents">%sveltekit.body%</div>
  </body>
</html>

I'm not sure how to bootstrap that programmatically so that the app can be started in tests ?

@kolodny
Copy link
Owner

kolodny commented Mar 18, 2024

You'll need to create a component that will render the test component. Take a look at how NextJS does it, you'll need to do something similar, I'm not familiar enough with Sveltekit to know how to do this. Also take a look at how the React Bootstrap component is defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants