Typescript: function is not a function in JavaScript to Typescript conversion?

前端 未结 1 368
长发绾君心
长发绾君心 2021-01-29 12:58

I am trying to convert an existing, working JavaScript project to TypeScript, & I specifically want to use the PageObject pattern.

I getting this error when I run np

1条回答
  •  一向
    一向 (楼主)
    2021-01-29 13:24

    I was able to reproduce the client.page.signinPage is not a function error. When I change the page_objects_path from pages to built/pages (because I presume Nightwatch is looking for JavaScript files and not TypeScript files), that error goes away and I get a different error, which I believe is because I don't have the browser driver installed correctly. Try changing the page_objects_path and hopefully your tests will work.

    0 讨论(0)
提交回复
热议问题