Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should be a no-op a factory with the given `name` is already registered', () => {
const factory = new Base64ModelFactory();
registry.addModelFactory(factory);
const disposable = registry.addModelFactory(new Base64ModelFactory());
disposable.dispose();
});
it('should get a registered model factory by name', () => {
const mFactory = new Base64ModelFactory();
registry.addModelFactory(mFactory);
expect(registry.getModelFactory('base64')).to.equal(mFactory);
});
});
it('should be a no-op if the same factory is already registered', () => {
const factory = new Base64ModelFactory();
registry.addModelFactory(factory);
const disposable = registry.addModelFactory(factory);
disposable.dispose();
});