LeanFT JavaScript Test Fails: beforeAll is not defined

  • Questions
  • 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: 339, Answers: 20)
Asked on January 26, 2017 10:54 pm
33 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: 16, Answers: 749)
Answered on January 26, 2017 10:55 pm
Changing that made our test work. Thanks!
( at January 26, 2017 10:57 pm)