"use strict";

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

var _index = _interopRequireDefault(require("../index"));

var _presenter = _interopRequireDefault(require("../presenter"));

var _featureCheck = require("../../../../util/featureCheck");

describe('IfFeature', function () {
  var testbed = createTestbed(withContext(_index.default), {
    name: 'hot_new_feature'
  });
  it('should fetch feature status from store', function () {
    testbed.render();
    expect(testbed.findChildByType(_presenter.default).props.isOn).to.be.false();
  });
  context('with features enabled', function () {
    (0, _featureCheck.withTestFeatures)(['hot_new_feature']);
    it('should fetch feature status from store', function () {
      testbed.render();
      expect(testbed.findChildByType(_presenter.default).props.isOn).to.be.true();
    });
  });
});