@haechi-labs/henesis-cli
Version:
🚀 Command Line Interface tool to Utilize henesis
34 lines • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const test_1 = require("@oclif/test");
const configstore_1 = tslib_1.__importDefault(require("../common/configstore"));
describe('config', () => {
before(() => {
process.env.HENESIS_TEST = 'false';
});
test_1.test
.stdout()
.command(['config'])
.exit(2)
.it('should fail do not specify an option');
test_1.test
.stdout()
.command(['config', '-e', 'http://asdf'])
.it('should be success to change http url', (ctx) => {
test_1.expect(ctx.stdout).to.equal('Successfully set to http://asdf\n');
test_1.expect(configstore_1.default.get('endpoint')).to.equal('http://asdf');
});
test_1.test
.stdout()
.command(['config', '-e', 'https://asdf'])
.it('should be success to change https url', (ctx) => {
test_1.expect(ctx.stdout).to.equal('Successfully set to https://asdf\n');
test_1.expect(configstore_1.default.get('endpoint')).to.equal('https://asdf');
});
after(() => {
process.env.HENESIS_TEST = 'true';
configstore_1.default.delete('endpoint');
});
});
//# sourceMappingURL=config.spec.js.map