// SPDX-License-Identifier: Apache-2.0
import { LayeredConfigProvider } from '../../../../../src/data/configuration/impl/layered-config-provider.js';
import { ClassToObjectMapper } from '../../../../../src/data/mapper/impl/class-to-object-mapper.js';
import { ConfigKeyFormatter } from '../../../../../src/data/key/config-key-formatter.js';
import { expect } from 'chai';
import { ConfigurationError } from '../../../../../src/data/configuration/api/configuration-error.js';
describe('LayeredConfigProvider', () => {
    const mapper = new ClassToObjectMapper(ConfigKeyFormatter.instance());
    it('should not throw an error when registering a valid initial config (issue #2094)', () => {
        const provider = new LayeredConfigProvider(mapper, 'SOLO');
        expect(provider).is.not.null.and.not.undefined;
        expect(() => provider.config()).to.throw(ConfigurationError);
        const config = provider.builder().build();
        expect(() => provider.config()).to.not.throw();
        expect(() => provider.register(config)).to.throw(ConfigurationError);
        expect(() => provider.config()).to.not.throw();
    });
});
//# sourceMappingURL=layered-config-provider.test.js.map