"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

function _chai() {
  const data = require("chai");

  _chai = function () {
    return data;
  };

  return data;
}

function _sinon() {
  const data = _interopRequireDefault(require("sinon"));

  _sinon = function () {
    return data;
  };

  return data;
}

function _export() {
  const data = _interopRequireDefault(require("../../../api/consumer/lib/export"));

  _export = function () {
    return data;
  };

  return data;
}

function _exceptions() {
  const data = require("../../../scope/exceptions");

  _exceptions = function () {
    return data;
  };

  return data;
}

function consumer() {
  const data = _interopRequireWildcard(require("../../../consumer"));

  consumer = function () {
    return data;
  };

  return data;
}

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