refactor(reflector): cleanup
This commit is contained in:
@ -36,7 +36,7 @@ export function main() {
|
||||
expect(p).toBeFuture();
|
||||
});
|
||||
|
||||
it('should return a future if the binding is sync', function () {
|
||||
it('should return a future when the binding is sync', function () {
|
||||
var injector = new Injector([
|
||||
SynchronousUserList
|
||||
]);
|
||||
@ -44,6 +44,14 @@ export function main() {
|
||||
expect(p).toBeFuture();
|
||||
});
|
||||
|
||||
it("should return a future when the binding is sync (from cache)", function () {
|
||||
var injector = new Injector([
|
||||
UserList
|
||||
]);
|
||||
expect(injector.get(UserList)).toBeAnInstanceOf(UserList);
|
||||
expect(injector.asyncGet(UserList)).toBeFuture();
|
||||
});
|
||||
|
||||
it('should return the injector', function (done) {
|
||||
var injector = new Injector([]);
|
||||
var p = injector.asyncGet(Injector);
|
||||
@ -67,14 +75,6 @@ export function main() {
|
||||
});
|
||||
});
|
||||
|
||||
it("should return a future when the binding is sync from cache", function () {
|
||||
var injector = new Injector([
|
||||
UserList
|
||||
]);
|
||||
expect(injector.get(UserList)).toBeAnInstanceOf(UserList);
|
||||
expect(injector.asyncGet(UserList)).toBeFuture();
|
||||
});
|
||||
|
||||
it("should create only one instance (async + async)", function (done) {
|
||||
var injector = new Injector([
|
||||
bind(UserList).toAsyncFactory([], fetchUsers)
|
||||
|
Reference in New Issue
Block a user