Skip to content

Commit

Permalink
feat(waynodes): add waynodes to generateParams.js
Browse files Browse the repository at this point in the history
* Add waynodes to generateParams.js

* Add second hyphen to waynodes param

* Add test
  • Loading branch information
EricPKerr authored and missinglink committed Dec 12, 2019
1 parent 8cb3969 commit 0997d61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/generateParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ function generateParams(config) {
if( config.hasOwnProperty( 'leveldb' ) ){
flags.push( `-leveldb=${config.leveldb}` );
}
if( config.hasOwnProperty( 'waynodes' ) ){
flags.push( `--waynodes=${config.waynodes}` );
}

flags.push( config.file );

Expand Down
13 changes: 13 additions & 0 deletions test/lib/generateParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ module.exports.tests.params = function(test) {
t.equal(params[0], expected, 'tag array is serialized into parameter');
t.end();
});

test('waynodes', function(t) {
const config = {
waynodes: true
};

const params = generateParams(config);

const expected = '--waynodes=true';

t.equal(params[0], expected, 'waynodes is serialized into parameter');
t.end();
});
};

module.exports.all = function (tape, common) {
Expand Down

0 comments on commit 0997d61

Please sign in to comment.