LeanFT JavaScript Test Fails: beforeAll is not defined
Question ID: 107411
1
0

My LeanFT JavaScript test is failing with the error:

beforeAll(function(done) {
^

ReferenceError: beforeAll is not defined

I’m not sure how to fix this. We’re using the Mocha framework.

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on January 26, 2017 10:54 pm
899 views
Answers (1)
1
Private answer

beforeAll() and afterAll() are used in the Jasmine framework, not the Mocha framework. Change your code to use

before()

and

after()

instead of beforeAll() and afterAll() and that should fix the issue.

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on January 26, 2017 10:55 pm
0
Changing that made our test work. Thanks!
( at January 26, 2017 10:57 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top