vendredi 1 juillet 2016

Tracking function execution time with jasmine

Is it possible to create a reusable jasmine matcher that would assert a function to run for less than N seconds?

Sample expectation style:

expect(someFunction, [arg1, arg2]).toBeCompletedForLessThan(3);
expect(obj.someMethod, [arg1, arg2]).toBeCompletedForLessThan(5);


We'd like to tie this up with Protractor and custom performance tests where we want to assert that certain UI execution steps don't go beyond the time limit.

Aucun commentaire:

Enregistrer un commentaire