I am currently using karma
and jasmine
in my Angular
project and I have noticed that some tests are slow.
So, I'm looking for a solution/reporter that shows the execution time for each file.
Do npm i --save-dev karma-time-stats-reporter
(https://www.npmjs.com/package/karma-time-stats-reporter)
In karma.conf.js, in plugins: [...]
, add the entry require('karma-time-stats-reporter')
Add the timeStatsReporter
config object as specified in the documentation of the link I sent you. You should get the time after each test and when all of your tests run, it will show which tests took longer than 500ms. You can play around with the configuration to specify your own.