Skip to content
Browse files

added a few more tests

  • Loading branch information...
1 parent 133bfeb commit 333d33d20db3510753fb952c7c55385414601a26 constantology committed May 17, 2013
Showing with 15 additions and 0 deletions.
  1. +5 −0 test/d8.test.js
  2. +5 −0 test/locale/GR.test.js
  3. +5 −0 test/locale/en-US.test.js
View
5 test/d8.test.js
@@ -122,6 +122,11 @@ suite( 'd8 (en-GB/default)', function() {
expect( Date.coerce( '2010-08-30T10:10:10.010+04:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
expect( Date.coerce( '2010-08-30T10:10:10.010-08:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, ( 10 + offset ), 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, 10 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0400', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010-0800', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+
done();
} );
View
5 test/locale/GR.test.js
@@ -118,6 +118,11 @@ suite( 'd8 (greek-"ish")', function() {
expect( Date.coerce( '2010-08-30T10:10:10.010+04:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
expect( Date.coerce( '2010-08-30T10:10:10.010-08:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, ( 10 + offset ), 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, 10 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0400', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010-0800', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+
done();
} );
View
5 test/locale/en-US.test.js
@@ -119,6 +119,11 @@ suite( 'd8 (en-US)', function() {
expect( Date.coerce( '2010-08-30T10:10:10.010+04:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
expect( Date.coerce( '2010-08-30T10:10:10.010-08:00Z', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, ( 10 + offset ), 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0000', 'c' ) ).to.eql( new Date( 2010, 7, 30, 10 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010+0400', 'c' ) ).to.eql( new Date( 2010, 7, 30, 6 + offset, 10, 10, 10 ) );
+ expect( Date.coerce( '2010-08-30T10:10:10.010-0800', 'c' ) ).to.eql( new Date( 2010, 7, 30, 18 + offset, 10, 10, 10 ) );
+
done();
} );

0 comments on commit 333d33d

Please sign in to comment.
Something went wrong with that request. Please try again.