Created
December 4, 2019 15:16
-
-
Save silvawillian/388479c322769ff0b22b461a0ca6b16c to your computer and use it in GitHub Desktop.
Revisions
-
silvawillian created this gist
Dec 4, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ /* eslint-disable */ beforeEach(function cb() { if (!this.currentTest.parent.timerStart) { this.currentTest.parent.timerIndex = 0; this.currentTest.parent.timerStart = Date.now(); } }); afterEach(function cb() { if (this.currentTest.parent.timerStart && ++this.currentTest.parent.timerIndex === this.currentTest.parent.tests.length) { const elapsedTimeInMs = Date.now() - this.currentTest.parent.timerStart; if (elapsedTimeInMs >= 1000) { console.error(`File: "${this.currentTest.file}" - Suite: "${this.currentTest.parent.fullTitle()}" - Elapsed: ${elapsedTimeInMs}ms`); } } });