corrade-nucleus-nucleons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | describe('extend', function() { |
2 | it('when given an empty destination and an object to be extended with then the destination object contains source properties', function() { |
||
3 | var me = {}; |
||
4 | var him = { name: 'Serban', job: 'programmer' }; |
||
5 | extend(me, him); |
||
6 | expect(me.name).toBe('Serban'); |
||
7 | expect(me.job).toBe('programmer'); |
||
8 | }); |
||
9 | |||
10 | it('when given a destination and a source that has the same keys as destination then those key values will be overridden', function() { |
||
11 | var me = { name: 'Serban', job: 'programmer' }; |
||
12 | var him = { name: 'Bob', job: 'artist' }; |
||
13 | extend(me, him); |
||
14 | expect(me.name).toBe('Bob'); |
||
15 | expect(me.job).toBe('artist'); |
||
16 | }); |
||
17 | }); |