lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 137 forks source link

Continuous Integration with VSTS #218

Closed Killmore closed 7 years ago

Killmore commented 7 years ago

Having an issue when I run my tests in VSTS that contain calls to the TestUtils. Below is the code to my unit test. Running it in my CI build results in: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

If I comment out the beforeEach method, it works so I'm assuming it has something to do with the async aspect.

describe('Pages: Login', () => {  
  beforeEach(async(() => TestUtils.beforeEachCompiler([LoginPage]).then(compiled => {
    fixture = compiled.fixture;
    instance = compiled.instance;    
  })));

  afterEach(() => {    
    fixture.destroy();    
  });

  it('works when beforeEach method commented out', () => {
    expect(true).toBeTruthy();    
  })  
});

Funny thing is it works when I run it locally but once I push up to the server and CI build kicks off it don't likey... Any thoughts?

lathonez commented 7 years ago

I have zero experience with VSTS.

Drawing from wider CI experience (Jenkins / Travis), most all my problems where something works locally but doesn't on CI have been due to version mismatches. Typically my local machine has a version of something I don't expect.

My suggestions are:

Further to that I'd be raising this with the VSTS community.

Sorry I can't be of more help - I'd hope that the fact we use two CI providers here will let you prove out whether or not the issue is with your code or with the VSTS CI setup.

lathonez commented 7 years ago

Oh - obviously if you find it's an issue with the framework we're using here please re-open so I can address it.