aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsiwalikm <[email protected]>2018-11-12 00:09:59 +0530
committersiwalikm <[email protected]>2018-11-12 00:09:59 +0530
commitc63ac00c2cca2062ce733851f7239ed8db3ad00a (patch)
treee88cefb3087851b0124eec13a74bc936a3342641 /test
parent3a9a30d92f4c4bb9a20a34027ede6ce7bd5e9604 (diff)
downloadfaker-c63ac00c2cca2062ce733851f7239ed8db3ad00a.tar.xz
faker-c63ac00c2cca2062ce733851f7239ed8db3ad00a.zip
adding unit test
Diffstat (limited to 'test')
-rw-r--r--test/time.unit.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/time.unit.js b/test/time.unit.js
new file mode 100644
index 00000000..88b81904
--- /dev/null
+++ b/test/time.unit.js
@@ -0,0 +1,16 @@
+if (typeof module !== 'undefined') {
+ var assert = require('assert');
+ var sinon = require('sinon');
+ var faker = require('../index');
+}
+
+describe("time.js", function () {
+ describe("recent()", function () {
+ it("returns the recent timestamp in Unix time format", function () {
+ var date = faker.time.recent();
+ assert.ok(date == new Date().getTime());
+ });
+
+ });
+
+});