'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var mocha = require('../utils/mocha.js');
var utils = require('./utils.js');

function testBitswap(factory, options) {
  const describe = mocha.getDescribe(options);
  const it = mocha.getIt(options);
  describe('.stats.bitswap', () => {
    let ipfs;
    before(async () => {
      ipfs = (await factory.spawn()).api;
    });
    after(() => factory.clean());
    it('should get bitswap stats', async () => {
      const res = await ipfs.stats.bitswap();
      utils.expectIsBitswap(null, res);
    });
  });
}

exports.testBitswap = testBitswap;
