量角器-beforeAll和afterAll未定义 [英] Protractor - beforeAll and afterAll undefined

查看:149
本文介绍了量角器-beforeAll和afterAll未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用量角器和茉莉花.量角器版本为3.2.2,我使用命令protractor --version找到了它.如何找到量角器使用的茉莉花版本.当我阅读更新文档时,我找不到升级茉莉花的步骤,我发现的只是在配置文件中添加jasmine2.

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.

我的配置文件如下

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

但是我仍然无法使用beforeAll and afterAll.我在这里想念什么吗?由于beforeAll and afterAll是不确定的,我认为量角器使用的茉莉花版本不是2x.

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.

非常感谢您的帮助.

谢谢.

推荐答案

量角器3.2.2(自20th April 2016起)与Jasmine 2.4捆绑在一起

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

全新安装的量角器应为您获取2.4版本,并且您可以在查看npm安装依赖项树日志(完成模块安装后的npm输出)时进行验证,在该树中搜索茉莉花,您应该请参阅报告的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'

framework: 'jasmine'

这篇关于量角器-beforeAll和afterAll未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆