Closed praveenngp15 closed 2 years ago
Your local variable jasmine
is shadowing the global jasmine
. Try either renaming it or using jasmine.env
rather than jasmine.getEnv()
.
Actually, if adding a reporter is your only reason for accessing the env, you can just do jasmine.addReporter(...)
. See https://jasmine.github.io/setup/nodejs.html and https://jasmine.github.io/api/npm/4.1/Jasmine.html .
using jasmine.getEnv with wdio for getting spec status.
Getting a below error jasmine.getEnv is not a function.
My code var Jasmine = require('jasmine'); var jasmine = new Jasmine(); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));