BREAKING CHANGE (maybe) Well as long as our customers use public API this should not be a breaking change, but we have changed import structure as well as internal names, so it could be breaking. import: angular2/annotations => angular2/metadata Classes: *Annotations => *Metadata renderer.DirectiveMetadata => renderer.RendererDirectiveMetadata renderer.ElementBinder => renderer.RendererElementBinder impl.Directive => impl.DirectiveMetadata impl.Component => impl.ComponentMetadata impl.View => impl.ViewMetadata Closes #3660
		
			
				
	
	
		
			27 lines
		
	
	
		
			997 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			997 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import {RenderDirectiveMetadata} from 'angular2/src/render/api';
 | |
| 
 | |
| import {MapWrapper} from 'angular2/src/facade/collection';
 | |
| import {ddescribe, describe, expect, it} from 'angular2/test_lib';
 | |
| 
 | |
| export function main() {
 | |
|   describe('Metadata', () => {
 | |
|     describe('host', () => {
 | |
|       it('should parse host configuration', () => {
 | |
|         var md = RenderDirectiveMetadata.create({
 | |
|           host: MapWrapper.createFromPairs([
 | |
|             ['(event)', 'eventVal'],
 | |
|             ['[prop]', 'propVal'],
 | |
|             ['@action', 'actionVal'],
 | |
|             ['attr', 'attrVal']
 | |
|           ])
 | |
|         });
 | |
| 
 | |
|         expect(md.hostListeners).toEqual(MapWrapper.createFromPairs([['event', 'eventVal']]));
 | |
|         expect(md.hostProperties).toEqual(MapWrapper.createFromPairs([['prop', 'propVal']]));
 | |
|         expect(md.hostActions).toEqual(MapWrapper.createFromPairs([['action', 'actionVal']]));
 | |
|         expect(md.hostAttributes).toEqual(MapWrapper.createFromPairs([['attr', 'attrVal']]));
 | |
|       });
 | |
|     });
 | |
|   });
 | |
| }
 |