diff options
Diffstat (limited to 'test/date.unit.js')
| -rw-r--r-- | test/date.unit.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/date.unit.js b/test/date.unit.js index 83b73ca9..e01f0531 100644 --- a/test/date.unit.js +++ b/test/date.unit.js @@ -1,14 +1,14 @@ if (typeof module !== 'undefined') { var assert = require('assert'); var sinon = require('sinon'); - var Faker = require('../index'); + var faker = require('../index'); } describe("date.js", function () { describe("past()", function () { it("returns a date N years into the past", function () { - var date = Faker.Date.past(75); + var date = faker.Date.past(75); assert.ok(Date.parse(date) < new Date()); }); @@ -16,7 +16,7 @@ describe("date.js", function () { var refDate = new Date(2120, 11, 9, 10, 0, 0, 0); // set the date beyond the usual calculation (to make sure this is working correctly) - var date = Date.parse(Faker.Date.past(75, refDate.toJSON())); + var date = Date.parse(faker.Date.past(75, refDate.toJSON())); assert.ok(date < refDate && date > new Date()); // date should be before date given but after the current time }); @@ -26,7 +26,7 @@ describe("date.js", function () { describe("future()", function () { it("returns a date N years into the future", function () { - var date = Faker.Date.future(75); + var date = faker.Date.future(75); assert.ok(Date.parse(date) > new Date()); }); @@ -35,7 +35,7 @@ describe("date.js", function () { var refDate = new Date(1880, 11, 9, 10, 0, 0, 0); // set the date beyond the usual calculation (to make sure this is working correctly) - var date = Date.parse(Faker.Date.future(75, refDate.toJSON())); + var date = Date.parse(faker.Date.future(75, refDate.toJSON())); assert.ok(date > refDate && date < new Date()); // date should be after the date given, but before the current time }); @@ -44,7 +44,7 @@ describe("date.js", function () { describe("recent()", function () { it("returns a date N days from the recent past", function () { - var date = Faker.Date.recent(30); + var date = faker.Date.recent(30); assert.ok(Date.parse(date) < new Date()); }); @@ -57,7 +57,7 @@ describe("date.js", function () { var from = new Date(1990, 5, 7, 9, 11, 0, 0); var to = new Date(2000, 6, 8, 10, 12, 0, 0); - var date = Date.parse(Faker.Date.between(from, to)); + var date = Date.parse(faker.Date.between(from, to)); assert.ok(date > from && date < to); }); |
