没有定义BeforeAll(老茉莉)茉莉、定义、BeforeAll

由网友(我还是失去了你)分享简介:我刚安装了量角器V2.0.0 。我试图 beforeAll 添加到测试,并得到误差I just installed Protractor v2.0.0. I tried to add beforeAll to a test and got error的ReferenceError:未定义beforeAll Ref...

我刚安装了量角器V2.0.0 。我试图 beforeAll 添加到测试,并得到误差

I just installed Protractor v2.0.0. I tried to add beforeAll to a test and got error

的ReferenceError:未定义beforeAll

ReferenceError: beforeAll is not defined

综观堆栈跟踪我看到茉莉1.3.1量角器是一个子模块:

Looking at the the stacktrace I see jasmine 1.3.1 is a submodule of protractor:

C:UsersbmackeyAppDataRoamingpmode_modulesprotractorode_modulesminijasminenodelibjasmine-1.3.1.js:913:21

C:UsersbmackeyAppDataRoamingnpmnode_modulesprotractornode_modulesminijasminenodelibjasmine-1.3.1.js:913:21

beforeAll 在茉莉花2.1引入的。我试图 NPM我-g茉莉花之前,所有无济于事。我怎样才能得到这个功能工作?

beforeAll is introduced in jasmine 2.1. I tried npm i -g jasmine-before-all to no avail. How can I get this functionality to work?

推荐答案

量角器依然采用 jasmine1 默认情况下。你必须在你的配置设置茉莉版

Protractor is still using jasmine1 by default. You have to set jasmine version in your config

framework: 'jasmine2',

您可以找到参考配置文件中

阅读全文

相关推荐

最新文章