refactor(PipeRegistry): improve error messages

Closes #1504
This commit is contained in:
Pawel Kozlowski
2015-04-23 15:27:20 +02:00
committed by Misko Hevery
parent fa8e059f28
commit d0059b5d75
2 changed files with 6 additions and 6 deletions
@@ -22,7 +22,7 @@ export function main() {
it("should throw when no matching type", () => {
var r = new PipeRegistry({});
expect(() => r.get("unknown", "some object", null)).toThrowError(
`Cannot find a pipe for type 'unknown' object 'some object'`
`Cannot find 'unknown' pipe supporting object 'some object'`
);
});
@@ -32,7 +32,7 @@ export function main() {
});
expect(() => r.get("type", "some object", null)).toThrowError(
`Cannot find a pipe for type 'type' object 'some object'`
`Cannot find 'type' pipe supporting object 'some object'`
);
});
});
@@ -54,4 +54,4 @@ class PipeFactory {
create(cdRef):Pipe {
return this.pipe;
}
}
}