diff options
| author | Misko Hevery | 2010-10-13 12:47:10 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-10-13 12:47:10 -0700 | 
| commit | 805753dba47f7ef5b34af9579c1d0486f5f4ea68 (patch) | |
| tree | 4ed514732ace492c20fcfa1aea02989fe8c15462 /test/AngularSpec.js | |
| parent | 3ab49538a414a36c97ed3735c2473eefcf7be073 (diff) | |
| download | angular.js-805753dba47f7ef5b34af9579c1d0486f5f4ea68.tar.bz2 | |
fixed issue where date copy creates an object instead of date
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"}];  | 
