Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1846,19 +1846,19 @@ or refactoring an existing one.
```javascript
import assert from "assert";

describe("MakeMomentJSGreatAgain", () => {
describe("MomentJS", () => {
it("handles date boundaries", () => {
let date;

date = new MakeMomentJSGreatAgain("1/1/2015");
date = new MomentJS("1/1/2015");
date.addDays(30);
assert.equal("1/31/2015", date);

date = new MakeMomentJSGreatAgain("2/1/2016");
date = new MomentJS("2/1/2016");
date.addDays(28);
assert.equal("02/29/2016", date);

date = new MakeMomentJSGreatAgain("2/1/2015");
date = new MomentJS("2/1/2015");
date.addDays(28);
assert.equal("03/01/2015", date);
});
Expand All @@ -1870,21 +1870,21 @@ describe("MakeMomentJSGreatAgain", () => {
```javascript
import assert from "assert";

describe("MakeMomentJSGreatAgain", () => {
describe("MomentJS", () => {
it("handles 30-day months", () => {
const date = new MakeMomentJSGreatAgain("1/1/2015");
const date = new MomentJS("1/1/2015");
date.addDays(30);
assert.equal("1/31/2015", date);
});

it("handles leap year", () => {
const date = new MakeMomentJSGreatAgain("2/1/2016");
const date = new MomentJS("2/1/2016");
date.addDays(28);
assert.equal("02/29/2016", date);
});

it("handles non-leap year", () => {
const date = new MakeMomentJSGreatAgain("2/1/2015");
const date = new MomentJS("2/1/2015");
date.addDays(28);
assert.equal("03/01/2015", date);
});
Expand Down