Protractor - beforeAll and afterAll undefined

2019-04-16 12:45发布

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条回答
\"骚年 ilove
2楼-- · 2019-04-16 13:47

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'

查看更多
登录 后发表回答