Angular 2 (cli) transporter jasmine expect does not resolve promise
I am writing E2E tests with Protractor and Angular 2 using Jasmine.
I am trying to do a simple wait on the getText()
item returned by the protractor.
it('should display correct hero title', () => {
expect(element(by.css('Hero-title')).getText()).toEqual('Foobar');
});
This results in a type error :
Argument of type '"Foobar"' is not assignable to parameter of type 'Expected<Promise<string>>'. [2345]
I know what I could use .then
, but I don't want to do that as I will have loads from these expectations.
Using the new Angular CLI project this works as expected. I've gone through all the configs but can't seem to find the difference.
+3
source to share