Very strange error jasmine.DEFAULT_TIMEOUT_INTERVAL

I am trying to run some e2e tests using protractorand phantomjs. When I run the test, I get an error message:

- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

Test:

import { browser, element, by } from 'protractor';

describe('example test', () => {

  it('stupid test', () => {
    console.log('in test');
    expect(true).toBe(true);
  });    

});

Any idea what the problem is? any help is appreciated :)

+4
source share
1 answer

For me (using karma), the specified port in the Karma configuration file did not match the specified port in the protractor configuration file.

exports.config = {
...,
baseUrl: 'http://localhost:9876/',//<--This port should match the port in your Karma (test runner) config file
framework: 'jasmine',
jasmineNodeOpts: {
  defaultTimeoutInterval: 3000,
  print: function() {}
}

This answer seemed obvious after I found it, but the ports received changes in source control, and the fix was not immediately obvious.

0
source

Source: https://habr.com/ru/post/1672254/


All Articles