From 0f18c5caf17b1abfc008ddda4e471785f88fb9e9 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 29 Jun 2018 10:29:07 -0400 Subject: [PATCH] display gas cost of each test --- lib/modules/tests/reporter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/modules/tests/reporter.js b/lib/modules/tests/reporter.js index de20b469..db515061 100644 --- a/lib/modules/tests/reporter.js +++ b/lib/modules/tests/reporter.js @@ -26,6 +26,10 @@ class EmbarkSpec extends Base { console.log(fmt, receipt.className, receipt.gasUsed); } + function onBlockHeader(blockHeader) { + self.stats.totalGasCost += blockHeader.gasUsed; + self.stats.test.gasUsed += blockHeader.gasUsed; + } function onBlockHeader(blockHeader) { if(!self.listenForGas) {