1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 01:27:31 -04:00
notes/node_modules/yargs/test/parse_modified.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

22 lines
569 B
JavaScript

var should = require('chai').should(),
yargs = require('../');
describe('parse', function () {
describe('boolean modifier function', function () {
it('should prevent yargs from sucking in the next option as the value of the first option', function () {
// Arrange & Act
var result = yargs().boolean('b').parse([ '-b', '123' ]);
// Assert
result.should.have.property('b').that.is.a('boolean').and.is.true;
result.should.have.property('_').and.deep.equal([123]);
});
});
});