Skip to content

Commit

Permalink
agregamos pruebas para datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
emilioplatzer committed Aug 29, 2017
1 parent 85cc198 commit 7522afc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "json4all",
"description": "JSON for all purposes and all environments",
"version": "0.3.6",
"version": "0.3.7",
"author": "Codenautas <codenautas@googlegroups.com>",
"repository": "codenautas/json4all",
"license": "MIT",
Expand Down Expand Up @@ -33,10 +33,10 @@
"mocha": "~3.5.0",
"phantomjs-prebuilt": "~2.1.15",

"best-globals": "~0.10.0",
"discrepances": "~0.1.4",
"best-globals": "~0.10.1",
"discrepances": "~0.2.1",
"require-bro": "~0.1.5",
"type-store": "~0.1.12"
"type-store": "~0.2.0"
},
"engines": {
"node": ">= 0.12"
Expand Down
3 changes: 3 additions & 0 deletions test/test.js
Expand Up @@ -8,6 +8,7 @@ var ExampleClass = ExampleClass = require('./example-class.js');

var bestGlobals = require('best-globals');
var date = bestGlobals.date;
var datetime = bestGlobals.datetime;

var deepEqual;

Expand Down Expand Up @@ -98,6 +99,8 @@ var fixtures=[
{name:'{fecha}' ,value: {a:1, f:new Date(2016,2,2)} , check:function(o){ return o.f instanceof Date; }},
{bg:true, name:'fech',value: date.iso("1999-12-31") , expectEncode: '{"$special":"date","$value":"1999-12-31"}', check:function(o){ return o instanceof Date && o.isRealDate; }},
{bg:true, name:'{fech}',value: {a:1, f:date.ymd(2016,2,2)}, check:function(o){ return o.f.isRealDate; }},
{bg:true, name:'datetime',value: datetime.iso("1999-12-31") , expectEncode: '{"$special":"Datetime","$value":"1999-12-31"}', check:function(o){ return o instanceof bestGlobals.Datetime; }},
{bg:true, name:'{datetime}',value: {a:1, f:datetime.ymdHms(2016,2,2,12,1,2)}, check:function(o){ return o.f instanceof bestGlobals.Datetime; }},
{name:'bigNumber' ,value: 12345678901234567890 },
{name:'bool' ,value: true },
{name:'null' ,value: null },
Expand Down

0 comments on commit 7522afc

Please sign in to comment.