Skip to content

Allow e2e app serve to take options #4501

Open
@kierans

Description

@kierans

What problem does this feature solve?

vue-cli-service serve takes options (eg: the entry point). When serving the app as part of an e2e test it would be good to pass serve options as the default serving assumes what you're trying to run/test (see https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-e2e-nightwatch/index.js#L21).

For my use case, I'm building a Vue component library that wraps another library, and as such doesn't have an app to serve in the main source tree. However I have a few test cases that I want to run to verify the behaviour between my component and the wrapped library (it requires initialisation callbacks and other things) so I wrote a TestApp in the test tree that I want to run. However being in the test tree means I need to pass the entry point to the serve command, which I can't do as part of the e2e test run. Currently I have to serve the app and the tests separately (using the --url option of test:e2e). It would be nicer if the the test:e2e command took "serving" options.

What does the proposed API look like?

  1. Adjust the test:e2e command to take serving options eg: --entry <entrypoint>
  2. Pass serving options to serve (https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-e2e-nightwatch/index.js#L21)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions