text: "use strict";var _react=_interopRequireDefault(require("react")),_expect=_interopRequireDefault(require("expect")),_previous=_interopRequireDefault(require("./previous")),_constants=require("../../util/constants"),_componentSetup=_interopRequireDefault(require("../../util/specHelpers/componentSetup.spec"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(b,!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var setup=function(a){return(0,_componentSetup["default"])(_previous["default"],_objectSpread({children:_react["default"].createElement("div",null),previous:_expect["default"].createSpy()},a))};describe("Previous",function(){it("has previous class",function(){var a=setup(),b=a.wrapper;(0,_expect["default"])(b.hasClass(_constants.classes.PREVIOUS)).toBe(!0)}),it("goes to previous media on click",function(){var a=setup(),b=a.wrapper,c=a.props;b.simulate("click"),(0,_expect["default"])(c.previous).toHaveBeenCalled()}),it("children are rendered",function(){var a=setup(),b=a.wrapper,c=a.props;(0,_expect["default"])(b.prop("children")).toBe(c.children)})});