'use strict';

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

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

function testUnwant(factory, options) {
  const describe = mocha.getDescribe(options);
  const it = mocha.getIt(options);
  describe('.bitswap.unwant', function () {
    this.timeout(60 * 1000);
    let ipfs;
    before(async () => {
      ipfs = (await factory.spawn()).api;
    });
    after(() => factory.clean());
    it('should throw error for invalid CID input', async () => {
      await chai_js.expect(ipfs.bitswap.unwant('INVALID CID')).to.eventually.be.rejected();
    });
  });
}

exports.testUnwant = testUnwant;
