From 75fb0819f7c92ae5fec5fd2326e1726ada743c2f Mon Sep 17 00:00:00 2001 From: holgerd77 Date: Thu, 20 Dec 2018 11:17:40 +0100 Subject: [PATCH] Fixed path error in bin/rlp CLI command, activated associated integration test --- bin/rlp | 2 +- test/integration.spec.ts | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/bin/rlp b/bin/rlp index d1dddae..a7462e4 100755 --- a/bin/rlp +++ b/bin/rlp @@ -1,6 +1,6 @@ #!/usr/bin/env node -const rlp = require('./dist/index.js') +const rlp = require('../dist/index.js') const command = process.argv[2] var raw = process.argv[3] diff --git a/test/integration.spec.ts b/test/integration.spec.ts index 3439650..c86903f 100644 --- a/test/integration.spec.ts +++ b/test/integration.spec.ts @@ -1,4 +1,5 @@ import * as assert from 'assert' +import { exec } from 'child_process' import * as RLP from '../dist' describe('Distribution:', function() { @@ -9,16 +10,10 @@ describe('Distribution:', function() { }) }) -/* describe('CLI command:', function() { it('should be able to run CLI command', function() { - const execP = util.promisify(exec) - - async function bin() { - const { stdout, stderr } = await execP('./bin/rlp encode "[ 5 ]"') + exec('./bin/rlp encode "[ 5 ]"', (_error, stdout, _stderr) => { assert.equal(stdout.trim(), 'c105') - } - bin() + }) }) }) -*/