@haechi-labs/henesis-cli
Version:
🚀 Command Line Interface tool to Utilize henesis
27 lines (26 loc) • 1.02 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const test_1 = require('@oclif/test');
const config_1 = require('./config');
const configstore_1 = require('../common/configstore');
describe('Config', () => {
it('should be returned if setted endpoint', () => {
configstore_1.default.set('endpoint', 'https://henesis.io');
process.env.HENESIS_TEST = 'false';
const url = config_1.baseUrl();
process.env.HENESIS_TEST = 'true';
configstore_1.default.delete('endpoint');
test_1.expect(url).to.equal('https://henesis.io');
});
it('should be returned test url on test', () => {
const url = config_1.baseUrl();
test_1.expect(url).to.equal('http://localhost:8080');
});
it('should be returned prod url on production', () => {
process.env.HENESIS_TEST = 'false';
const url = config_1.baseUrl();
test_1.expect(url).to.equal('https://privatebeta.henesis.io');
process.env.HENESIS_TEST = 'true';
});
});
//# sourceMappingURL=config.spec.js.map