UNPKG

@haechi-labs/henesis-cli

Version:

🚀 Command Line Interface tool to Utilize henesis

53 lines • 2.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const test_1 = require("@oclif/test"); const rimraf_1 = tslib_1.__importDefault(require("rimraf")); const path_1 = require("path"); describe('init', () => { afterEach(() => { const path = path_1.join(__dirname, '..', '..', `/henesis`); rimraf_1.default(path, () => { }); }); test_1.test .stdout() .command(['init']) .it('must be able to successfully create folders.', (ctx) => { test_1.expect(ctx.stdout).to.equal('henesis initialization has been completed.\n'); }); test_1.test .stdout() .command(['init', '-n', 'sample']) .it('must be able to successfully create folders with name.', (ctx) => { const path = path_1.join(__dirname, '..', '..', `/sample`); rimraf_1.default(path, () => { }); test_1.expect(ctx.stdout).to.equal('henesis initialization has been completed.\n'); }); test_1.test .timeout(20000) .stdout() .command([ 'init', '-g', 'https://github.com/HAECHI-LABS/henesis-cryptokitties-klaytn.git', ]) .it('should be able to successfully create folders with git template', (ctx) => { const path = path_1.join(__dirname, '..', '..', `/henesis-cryptokitties-klaytn`); rimraf_1.default(path, () => { }); test_1.expect(ctx.stdout).to.equal('henesis initialization has been completed.\n'); }); test_1.test .stdout() .command(['init']) .command(['init', '-f']) .it('should be able to successfully create folder with force', (ctx) => { test_1.expect(ctx.stdout).to.equal('henesis initialization has been completed.\nhenesis initialization has been completed.\n'); }); test_1.test .stdout() .command(['init']) .command(['init']) .exit(2) .it('must be fail when directory already exists.'); }); //# sourceMappingURL=init.spec.js.map