diff options
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 1ccdf1c3..e0228e16 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -21,6 +21,13 @@ describe("copy", function(){ assertSame(arr, copy([], arr)); }); + it("should copy Date", function(){ + var date = new Date(123); + expect(copy(date) instanceof Date).toBeTruthy(); + expect(copy(date).getTime()).toEqual(123); + expect(copy(date) === date).toBeFalsy(); + }); + it("should copy array", function(){ var src = [1, {name:"value"}]; var dst = [{key:"v"}]; |
