diff options
| author | Misko Hevery | 2011-11-29 12:11:32 -0800 |
|---|---|---|
| committer | Misko Hevery | 2012-01-25 11:46:36 -0800 |
| commit | 8af4fde18246ac1587b471a549e70d5d858bf0ee (patch) | |
| tree | 925e223c9221c8e3b40ff3fb5cade11b819782d5 /test/AngularSpec.js | |
| parent | 5001c1a1217772d2bffe108bafd475b24badf559 (diff) | |
| download | angular.js-8af4fde18246ac1587b471a549e70d5d858bf0ee.tar.bz2 | |
add($compile): add compiler v2.0 - not connected
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 0ff0508f..2d469698 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -75,6 +75,22 @@ describe('angular', function() { }); }); + describe('shallow copy', function() { + it('should make a copy', function() { + var original = {key:{}}; + var copy = shallowCopy(original); + expect(copy).toEqual(original); + expect(copy.key).toBe(original.key); + }); + }); + + describe('elementHTML', function() { + it('should dump element', function() { + expect(lowercase(startingTag('<div attr="123">something<span></span></div>'))). + toEqual('<div attr="123">'); + }); + }); + describe('equals', function() { it('should return true if same object', function() { var o = {}; @@ -501,4 +517,11 @@ describe('angular', function() { dealoc(element); }); }); + + + describe('startingElementHtml', function(){ + it('should show starting element tag only', function(){ + expect(startingTag('<ng:abc x="2"><div>text</div></ng:abc>')).toEqual('<ng:abc x="2">'); + }); + }); }); |
