cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

custom devServer documentation

Open dwhieb opened this issue 3 years ago • 1 comments

Subject

devServer option for component testing

Description

In the current version of the component testing documentation about custom dev servers, it says:

A custom function can be passed into the devServer option, which allows the use of other dev servers not provided by Cypress out of the box. These can be from the Cypress community, preview builds not included with the app, or a custom one you create.

The function's signature takes in a Cypress Configuration object as its only parameter and returns either an instance of a devServer or a promise that resolves to a devServer instance.

However, I can't find any documentation about what the dev server is supposed to look like. The example returns an object with a port option and close method, rather than a Node Server instance. What are the requirements for the devServer instance?

For context, I'm using a custom dev server because my app doesn't use a framework.

Thanks!

dwhieb avatar Jul 19 '22 16:07 dwhieb

+1

The documentation is pretty null explaining the necessary steps for a custom dev server.

I'm struggling a little bit to setup a new component testing strategy using microbundle and rollup. I would like to check if Cypress has any ideas or plans to start covering them or at least improving the way of custom server works.

Thanks

willoliveira-air avatar Aug 15 '22 10:08 willoliveira-air