Monday 29 May 2017

jasmine.getEnv is not a function

I am attempting to assign a new reporter to Jasmine, but I am getting this error when I try to assign the new reporter. Any advice on how to get this working?

This is the error: enter image description here

this is the spec file, where I am trying to load this reporter:

run-tests.js

import Jasmine from 'jasmine'
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

var jasmine = new Jasmine()

jasmine.getEnv().clearReporters();               // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({  // add jasmine-spec-reporter
  spec: {
    displayPending: true
  }
}));

jasmine.loadConfigFile('jasmine.json');
jasmine.execute();



via Shawn

No comments:

Post a Comment