// SPDX-License-Identifier: Apache-2.0
import { expect } from 'chai';
import { EnvironmentConfigSource } from '../../../../../src/data/configuration/impl/environment-config-source.js';
import { InjectTokens } from '../../../../../src/core/dependency-injection/inject-tokens.js';
import { container } from 'tsyringe-neo';
describe('EnvironmentConfigSource', () => {
    it('test prefix is working correctly', async () => {
        const environment = process.env;
        try {
            process.env.ENV_NBR42_TRUE = '42';
            const prefix = 'ENV';
            const source = new EnvironmentConfigSource(container.resolve(InjectTokens.ObjectMapper), prefix);
            expect(source.prefix).to.equal(prefix);
            await source.load();
            expect(source.properties().has('nbr42.true')).to.be.true;
        }
        finally {
            process.env = environment;
        }
    });
});
//# sourceMappingURL=environment-config-source.test.js.map