"use strict";

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

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

var _react = _interopRequireDefault(require("react"));

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

describe('IfFeature', function () {
  var props = {
    children: _react.default.createElement("div", null, "myChildContent"),
    name: 'feature'
  };
  context('with feature off', function () {
    var testbed = createTestbed(_presenter.default, (0, _objectSpread2.default)({}, props, {
      isOn: false
    }));
    it('should not render children', function () {
      testbed.render();
      expect(testbed.getText()).to.not.include('myChildContent');
    });
  });
  context('with feature on', function () {
    var testbed = createTestbed(_presenter.default, (0, _objectSpread2.default)({}, props, {
      isOn: true
    }));
    it('should render children', function () {
      testbed.render();
      expect(testbed.getText()).to.include('myChildContent');
    });
  });
});