ci010 / electron-vue-next

A starter template for using vue-next with the electron.
https://ci010.github.io/electron-vue-next/
191 stars 27 forks source link

Testing guidance #57

Open jahsome opened 3 years ago

jahsome commented 3 years ago

This starter is fantastic. Thank you for the hard work you've put into the project as as the documentation.

I don't see any docs for testing. What are the options here. I've tried running cypress against http://localhost:8080 but it doesn't appear the application is properly bootstrapped. Additionally when I try to go to that URL with my browser, it returns a white screen (empty response).

So the question is, what is the strategy for testing an application bootstrapped with this template?

ci010 commented 3 years ago

I can try to add some testing framework like jest later. Testing frameworks are always heavy... Especially those in-browser e2e framework, so I'll try to investigate some other way for electron.

Also, the renderer side host (localhost:8080) is only worked in electron environment. Opening it in browser will cause problem. Unless you create some bridge API, mimic the APIs in preload.ts.