2015-05-13 18:54:46 -04:00
|
|
|
import {
|
|
|
|
AsyncTestCompleter,
|
|
|
|
beforeEach,
|
|
|
|
ddescribe,
|
|
|
|
describe,
|
|
|
|
expect,
|
|
|
|
iit,
|
|
|
|
inject,
|
|
|
|
it,
|
|
|
|
xit,
|
|
|
|
} from 'angular2/test_lib';
|
|
|
|
import {forwardRef, resolveForwardRef} from 'angular2/di';
|
|
|
|
import {Type} from 'angular2/src/facade/lang';
|
|
|
|
|
|
|
|
export function main() {
|
2015-05-22 18:39:28 -04:00
|
|
|
describe("forwardRef", function() {
|
2015-05-13 18:54:46 -04:00
|
|
|
it('should wrap and unwrap the reference', () => {
|
|
|
|
var ref = forwardRef(() => String);
|
|
|
|
expect(ref instanceof Type).toBe(true);
|
|
|
|
expect(resolveForwardRef(ref)).toBe(String);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|