2015-08-07 14:41:38 -04:00
|
|
|
import {
|
|
|
|
ddescribe,
|
|
|
|
xdescribe,
|
|
|
|
describe,
|
|
|
|
it,
|
|
|
|
iit,
|
|
|
|
xit,
|
|
|
|
expect,
|
|
|
|
beforeEach,
|
|
|
|
afterEach
|
2015-10-13 03:29:13 -04:00
|
|
|
} from 'angular2/testing_internal';
|
2015-08-07 14:41:38 -04:00
|
|
|
|
2015-10-11 01:11:13 -04:00
|
|
|
import {PipeProvider} from 'angular2/src/core/pipes/pipe_provider';
|
2015-09-04 01:01:36 -04:00
|
|
|
import {Pipe} from 'angular2/src/core/metadata';
|
2015-08-07 14:41:38 -04:00
|
|
|
|
|
|
|
class MyPipe {}
|
|
|
|
|
|
|
|
export function main() {
|
2015-10-11 01:11:13 -04:00
|
|
|
describe("PipeProvider", () => {
|
|
|
|
it('should create a provider out of a type', () => {
|
|
|
|
var provider = PipeProvider.createFromType(MyPipe, new Pipe({name: 'my-pipe'}));
|
|
|
|
expect(provider.name).toEqual('my-pipe');
|
|
|
|
expect(provider.key.token).toEqual(MyPipe);
|
2015-08-07 14:41:38 -04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|