mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
fix: rm deprecated class modules, clean up, rm indirection (#355)
* refactor: rm deprecations, clean up, rm indirection * fix: singleton init not being fired when inserting function * refactor and generic internal add * deprecate a few things that i impusively added lol
This commit is contained in:
@@ -98,4 +98,16 @@ describe('ioc container', () => {
|
||||
container.ready();
|
||||
expect(dependency.init).toHaveBeenCalledTimes(1);
|
||||
})
|
||||
|
||||
it('should detect a key already exists', () => {
|
||||
container.add({ '@sern/client': dependency2 });
|
||||
expect(container.hasKey('@sern/client')).toBeTruthy()
|
||||
})
|
||||
|
||||
|
||||
it('should detect a key already exists', () => {
|
||||
container.add({ '@sern/client': () => dependency2 });
|
||||
expect(container.hasKey('@sern/client')).toBeTruthy()
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user