Using require with relative paths

前端 未结 4 982
灰色年华
灰色年华 2020-11-27 16:41

We have a rather big set of end-to-end tests on Protractor. We are following the Page Object pattern which helps us to keep our tests clean and modular. We also have a set o

4条回答
  •  时光取名叫无心
    2020-11-27 17:43

    I think the method we use where I work might be a good solution for you. I have posted a brief example of how we handle everything. It's pretty nice b/c you can just call the page object functions in any spec file and you don't need to use require in the spec.

    Call a node module from another module without using require() everywhere

提交回复
热议问题