BeforeAll not defined (old jasmine)

I just installed Protractor v2.0.0 . I tried adding beforeAll to the test and got an error

ReferenceError: beforeAll not defined

Looking at the glass, I see that jasmine 1.3.1 is a submodule of the protractor:

C: \ Users \ bmackey \ AppData \ Roaming \ NPM \ node_modules \ protractor \ node_modules \ minijasminenode \ Lib \ jasmine-1.3.1.js: 913: 21

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

+5
source share
2 answers

The jasmine1 still uses jasmine1 by default. You must install the jasmine version in your configuration

 framework: 'jasmine2', 

For more information, see the link configuration file.

+11
source

Also, if you want to stay with jasmine-1.x for some reason, use jasmine-beforeAll . It provides the same beforeAll and afterAll .

+1
source

All Articles