Skip to content

Commit

Permalink
Updating main field in package.json and fixing january test (Hacker0x…
Browse files Browse the repository at this point in the history
…01#1605)

* Update package.json

* Fixing test for January
  • Loading branch information
andresfulla authored and martijnrusschen committed Feb 2, 2019
1 parent fe4b9c8 commit 6bb9dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "2.0.0",
"license": "MIT",
"homepage": "https://github.com/Hacker0x01/react-datepicker",
"main": "lib",
"main": "lib/index.js",
"module": "es",
"unpkg": "dist/react-datepicker.min.js",
"style": "dist/react-datepicker.min.css",
Expand Down
11 changes: 3 additions & 8 deletions test/calendar_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,9 @@ describe("Calendar", function() {

prevMonth.simulate("click");

if (utils.getMonth(selected) === 0) {
// This test has issues with January
expect(utils.getMonth(selected)).to.be.equal(0);
} else {
expect(utils.getMonth(selected)).to.be.equal(
utils.getMonth(calendar.state().date) + 1
);
}
expect(utils.getMonth(selected)).to.be.equal(
(utils.getMonth(calendar.state().date) + 1) % 12
);
});

it("should go to next month", function() {
Expand Down

0 comments on commit 6bb9dc4

Please sign in to comment.