Browse Source

Adding a UT for date ctor

Sebastien Ros 9 years ago
parent
commit
e5ae5133b6
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Jint.Tests/Runtime/EngineTests.cs

+ 10 - 0
Jint.Tests/Runtime/EngineTests.cs

@@ -1610,5 +1610,15 @@ namespace Jint.Tests.Runtime
                     equal('-1,23', d.toLocaleString());
             ");
         }
+
+        [Fact]
+        public void DateCtorShouldAcceptDate()
+        {
+            RunTest(@"
+                var a = new Date();
+                var b = new Date(a);
+                assert(String(a) === String(b));
+            ");
+        }
     }
 }