'use strict';

var _chai;

function _load_chai() {
  return _chai = require('chai');
}

var _sinon;

function _load_sinon() {
  return _sinon = _interopRequireDefault(require('sinon'));
}

var _export;

function _load_export() {
  return _export = _interopRequireDefault(require('../../../../src/api/consumer/lib/export'));
}

var _exceptions;

function _load_exceptions() {
  return _exceptions = require('../../../../src/scope/exceptions');
}

var _consumer;

function _load_consumer() {
  return _consumer = _interopRequireWildcard(require('../../../../src/consumer'));
}

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

describe('export', function () {
  var sandbox = void 0;
  beforeEach(function () {
    sandbox = (_sinon || _load_sinon()).default.createSandbox();
  });
  afterEach(function () {
    sandbox.restore();
  });
  xit('should throw a ComponentNotFound error if the component-id does include "@this" annotation', function () {
    sandbox.stub(_consumer || _load_consumer(), 'loadConsumer').returns(Promise.resolve({ exportAction: function exportAction() {
        return Promise.reject(new (_exceptions || _load_exceptions()).ComponentNotFound());
      } }));
    return (0, (_export || _load_export()).default)('@this/box/name', 'my.remote').then(function () {
      return (_chai || _load_chai()).expect.fail('should not be here');
    }).catch(function (err) {
      (0, (_chai || _load_chai()).expect)(err).to.be.an.instanceof((_exceptions || _load_exceptions()).ComponentNotFound);
    });
  });
});