text: var cov_wggfodol5=function(){var path="/home/sanket/Desktop/Explorer-Ciibadge/blockchain-explorer/app/test/txbyhour.js";var hash="1f228cda9fd7dedaf45d332f61cba0b5b4e8289f";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/home/sanket/Desktop/Explorer-Ciibadge/blockchain-explorer/app/test/txbyhour.js",statementMap:{"0":{start:{line:2,column:15},end:{line:2,column:37}},"1":{start:{line:3,column:15},end:{line:3,column:32}},"2":{start:{line:4,column:13},end:{line:4,column:28}},"3":{start:{line:6,column:15},end:{line:6,column:28}},"4":{start:{line:7,column:22},end:{line:7,column:38}},"5":{start:{line:8,column:14},end:{line:8,column:30}},"6":{start:{line:9,column:16},end:{line:9,column:34}},"7":{start:{line:11,column:13},end:{line:11,column:36}},"8":{start:{line:12,column:17},end:{line:12,column:52}},"9":{start:{line:14,column:0},end:{line:45,column:3}},"10":{start:{line:15,column:1},end:{line:20,column:4}},"11":{start:{line:16,column:2},end:{line:16,column:40}},"12":{start:{line:17,column:2},end:{line:17,column:42}},"13":{start:{line:18,column:2},end:{line:18,column:40}},"14":{start:{line:19,column:2},end:{line:19,column:46}},"15":{start:{line:22,column:1},end:{line:27,column:4}},"16":{start:{line:23,column:2},end:{line:23,column:24}},"17":{start:{line:24,column:2},end:{line:24,column:25}},"18":{start:{line:25,column:2},end:{line:25,column:24}},"19":{start:{line:26,column:2},end:{line:26,column:27}},"20":{start:{line:28,column:1},end:{line:44,column:4}},"21":{start:{line:29,column:14},end:{line:29,column:22}},"22":{start:{line:30,column:2},end:{line:30,column:45}},"23":{start:{line:31,column:2},end:{line:43,column:4}},"24":{start:{line:35,column:4},end:{line:35,column:28}},"25":{start:{line:36,column:4},end:{line:36,column:47}},"26":{start:{line:37,column:4},end:{line:37,column:32}},"27":{start:{line:38,column:4},end:{line:40,column:5}},"28":{start:{line:38,column:17},end:{line:38,column:18}},"29":{start:{line:39,column:5},end:{line:39,column:59}},"30":{start:{line:41,column:4},end:{line:41,column:11}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:14,column:57},end:{line:14,column:58}},loc:{start:{line:14,column:63},end:{line:45,column:1}},line:14},"1":{name:"(anonymous_1)",decl:{start:{line:15,column:8},end:{line:15,column:9}},loc:{start:{line:15,column:14},end:{line:20,column:2}},line:15},"2":{name:"(anonymous_2)",decl:{start:{line:22,column:7},end:{line:22,column:8}},loc:{start:{line:22,column:13},end:{line:27,column:2}},line:22},"3":{name:"(anonymous_3)",decl:{start:{line:28,column:31},end:{line:28,column:32}},loc:{start:{line:28,column:39},end:{line:44,column:2}},line:28},"4":{name:"(anonymous_4)",decl:{start:{line:34,column:3},end:{line:34,column:4}},loc:{start:{line:34,column:18},end:{line:42,column:4}},line:34}},branchMap:{},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0},b:{},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184",hash:"1f228cda9fd7dedaf45d332f61cba0b5b4e8289f"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();// SPDX-License-Identifier: Apache-2.0
  const expect=(cov_wggfodol5.s[0]++,require('chai').expect);const assert=(cov_wggfodol5.s[1]++,require('assert'));const chai=(cov_wggfodol5.s[2]++,require('chai'));const should=(cov_wggfodol5.s[3]++,chai.should());const{spy,stub}=(cov_wggfodol5.s[4]++,require('sinon'));const sinon=(cov_wggfodol5.s[5]++,require('sinon'));const request=(cov_wggfodol5.s[6]++,require('request'));const base=(cov_wggfodol5.s[7]++,'http://localhost:1337');const txbyhour=(cov_wggfodol5.s[8]++,require('./fixtures/txbyhour.json'));cov_wggfodol5.s[9]++;describe('GET /api/txByHour/:channel_genesis_hash/:day',()=>{cov_wggfodol5.f[0]++;cov_wggfodol5.s[10]++;before(()=>{cov_wggfodol5.f[1]++;cov_wggfodol5.s[11]++;this.get=sinon.stub(request,'get');cov_wggfodol5.s[12]++;this.post=sinon.stub(request,'post');cov_wggfodol5.s[13]++;this.put=sinon.stub(request,'put');cov_wggfodol5.s[14]++;this.delete=sinon.stub(request,'delete');});cov_wggfodol5.s[15]++;after(()=>{cov_wggfodol5.f[2]++;cov_wggfodol5.s[16]++;request.get.restore();cov_wggfodol5.s[17]++;request.post.restore();cov_wggfodol5.s[18]++;request.put.restore();cov_wggfodol5.s[19]++;request.delete.restore();});cov_wggfodol5.s[20]++;it('should return txbyhour ',done=>{cov_wggfodol5.f[3]++;const obj=(cov_wggfodol5.s[21]++,txbyhour);cov_wggfodol5.s[22]++;this.get.yields(null,JSON.stringify(obj));cov_wggfodol5.s[23]++;request.get(`${base}`+'/api/txByHour/6571ce3234a8808327849841eb9ed43a717f7f5bf430e1fb42f922f70185404d/1',(err,body)=>{cov_wggfodol5.f[4]++;cov_wggfodol5.s[24]++;body=JSON.parse(body);cov_wggfodol5.s[25]++;body.should.include.keys('status','rows');cov_wggfodol5.s[26]++;body.status.should.eql(200);cov_wggfodol5.s[27]++;for(let i=(cov_wggfodol5.s[28]++,0);i<body.rows.length;i++){cov_wggfodol5.s[29]++;body.rows[i].should.include.keys('datetime','count');}cov_wggfodol5.s[30]++;done();});});});