lundi 22 février 2016

Angular2 + Jasmine,

I followed the unit testing from this website (author: Torgeir Helgevold) @:TGH http://ift.tt/1Ru4Zpe to do unit testing, but got an error:

"Error:(15, 39) TS2345: Argument of type 'FunctionWithParamTokens' is not assignable to parameter of type '(done: () => void) => void'."

it('should define full name2', inject([DisplayName], (displayName) => {
            displayName.firstName = 'Joe';
            displayName.lastName = 'Smith';
            displayName.generateFullName();
            expect(displayName.fullName).toBe('Joe Smith');
        }));

Is the code in this website out of date? Can anyone give me some reference to learn unit testing with Anuglar2 + Jasmine?

Aucun commentaire:

Enregistrer un commentaire