test: Add tests for license manager reinit method (#9471)
This commit is contained in:
@@ -252,4 +252,20 @@ describe('License', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('reinit', () => {
|
||||
it('should reinitialize license manager', async () => {
|
||||
const license = new License(mock(), mock(), mock(), mock(), mock());
|
||||
await license.init();
|
||||
|
||||
const initSpy = jest.spyOn(license, 'init');
|
||||
|
||||
await license.reinit();
|
||||
|
||||
expect(initSpy).toHaveBeenCalledWith('main', true);
|
||||
|
||||
expect(LicenseManager.prototype.reset).toHaveBeenCalled();
|
||||
expect(LicenseManager.prototype.initialize).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user