@haechi-labs/henesis-cli
Version:
🚀 Command Line Interface tool to Utilize henesis
27 lines • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const test_1 = require("@oclif/test");
const url_1 = require("./url");
const configstore_1 = tslib_1.__importDefault(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 = url_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 = url_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 = url_1.baseUrl();
test_1.expect(url).to.equal('https://privatebeta.henesis.io');
process.env.HENESIS_TEST = 'true';
});
});
//# sourceMappingURL=url.spec.js.map