Skip to content

Commit

Permalink
Readd react-tap-event-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl committed Feb 17, 2016
1 parent edeed60 commit a736947
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/DayPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const TestUtils = require("react-addons-test-utils");

const DayPicker = require("../src/DayPicker").default;


const keys = {
LEFT: 37,
RIGHT: 39,
Expand Down Expand Up @@ -616,6 +615,7 @@ describe("DayPicker", () => {

it("calls event handlers on a day cell", () => {

require("react-tap-event-plugin")();

function isFirstDay(d) {
return d.getFullYear() === 2015 &&
Expand Down Expand Up @@ -674,7 +674,7 @@ describe("DayPicker", () => {

it("calls touch-tap event handler on a day cell", () => {


require("react-tap-event-plugin")();

const handleTouchTap = sinon.spy();

Expand Down Expand Up @@ -711,6 +711,7 @@ describe("DayPicker", () => {

it("does not call mouse events on disabled outside days", () => {

require("react-tap-event-plugin")();

const handleClick = sinon.spy();
const handleMouseEnter = sinon.spy();
Expand Down Expand Up @@ -746,6 +747,7 @@ describe("DayPicker", () => {

it("changes the month when tapping on enabled outside days", () => {

require("react-tap-event-plugin")();

const handleTouchTap = sinon.spy();

Expand All @@ -767,6 +769,7 @@ describe("DayPicker", () => {
});

it("shows the previous month when clicking on (enabled) outside days", () => {
require("react-tap-event-plugin")();
const dayPickerEl = TestUtils.renderIntoDocument(
<DayPicker
numberOfMonths={1}
Expand Down Expand Up @@ -826,6 +829,7 @@ describe("DayPicker", () => {

it("does not show the next month when clicking on an outside days of the first of 2 months", () => {

require("react-tap-event-plugin")();

const handleClick = sinon.spy();

Expand Down

0 comments on commit a736947

Please sign in to comment.