|
@@ -92,4 +92,12 @@ describe('ModuleCollection', () => {
|
|
|
collection.unregister(['a'])
|
|
|
expect(collection.get(['a']).state.value).toBe(true)
|
|
|
})
|
|
|
+
|
|
|
+ it('warns when unregistering non existing module', () => {
|
|
|
+ const spy = jest.spyOn(console, 'warn').mockImplementation()
|
|
|
+
|
|
|
+ const collection = new ModuleCollection({})
|
|
|
+ collection.unregister(['a'])
|
|
|
+ expect(spy).toHaveBeenCalled()
|
|
|
+ })
|
|
|
})
|