From 3e25580723444d99eb6e7b8ae826392ab6ee3c9e Mon Sep 17 00:00:00 2001 From: maxlath Date: Sat, 16 Dec 2017 18:43:14 +0100 Subject: [PATCH] commander: switch to an updated and customized version to accepts options before arguments cf https://github.com/maxlath/commander.js/commit/1297ae6 and https://github.com/tj/commander.js/pull/734 --- package.json | 2 +- test/general.js | 10 ++++++++++ test/wd-claims.js | 9 --------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ecdc3787..875518b9 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "chalk": "^1.1.3", "check-node-version": "^2.1.0", - "commander": "git+https://github.com/tj/commander.js.git", + "commander": "git+https://github.com/maxlath/commander.js.git", "copy2cb": "^1.0.1", "execa": "^0.4.0", "lodash": "^4.17.4", diff --git a/test/general.js b/test/general.js index 218c6cfb..22db619f 100644 --- a/test/general.js +++ b/test/general.js @@ -11,4 +11,14 @@ describe('general', function () { done() }) }) + + // Addressed by https://github.com/maxlath/commander.js/commit/1297ae6 + it('should accepts options before arguments', done => { + execa.shell('./bin/wd claims -c Q90 P625') + .then(res => { + res.stdout.should.equal('48.856577777778 2.3518277777778') + done() + }) + .catch(done) + }) }) diff --git a/test/wd-claims.js b/test/wd-claims.js index da70487b..2c7e3141 100644 --- a/test/wd-claims.js +++ b/test/wd-claims.js @@ -40,15 +40,6 @@ describe('wd claims', function () { .catch(done) }) - it('should accepts options before arguments', done => { - execa.shell('./bin/wd claims -c Q90 P625') - .then(res => { - res.stdout.should.equal('48.856577777778 2.3518277777778') - done() - }) - .catch(done) - }) - it('should filters properties from text', done => { const coords = '48.856577777778,2.3518277777778' execa.shell('./bin/wd claims Q90 coord')