Created
December 12, 2013 11:05
-
-
Save karlwestin/7926372 to your computer and use it in GitHub Desktop.
Nice javascript unit testing (jasmine) trick: which spec takes the most time?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("test suite that you wanna perf", function() { | |
beforeEach(function() { | |
this.start = performance.now(); | |
}); | |
afterEach(function() { | |
console.log(jasmine.getEnv().currentSpec.description, performance.now() - this.start); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment