Protractor - beforeAll and afterAll undefined

对着背影说爱祢 提交于 2019-12-12 09:24:44

问题


I am using Protractor with jasmine. Protractor version is 3.2.2, I found this using the command protractor --version. How to find the jasmine version used by protractor. When I read the updgrade doc, I couldn't find the steps to upgrade jasmine, all I found is to add jasmine2 in configuration file.

My configuration file looks like this

exports.config = {  framework: 'jasmine2', .... }

But I still was not able to use beforeAll and afterAll. Am I missing anything here. Since beforeAll and afterAll are undefined I think the version of jasmine used by protractor is not 2x.

Any help is greatly appreciated.

Thanks.


回答1:


Protractor 3.2.2 as of 20th April 2016 is bundled with Jasmine 2.4

A fresh install of protractor should fetch you the 2.4 version, and you can verify this while looking at the npm install dependency tree log (the npm output after it finished installing a module), search for jasmine in that tree and you should see the 2.4 version being reported.

Also, the correct config to be used is:

framework: 'jasmine'



来源:https://stackoverflow.com/questions/36709893/protractor-beforeall-and-afterall-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!