|
|
|
|
@ -21,10 +21,21 @@ describe('test parse args', () => {
|
|
|
|
|
'https://www.facebook.com/bar/events/', |
|
|
|
|
]); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
['-?', '--help', '-h'].forEach((param) => { |
|
|
|
|
it('parses help options', () => { |
|
|
|
|
const res = parse_args([param]); |
|
|
|
|
expect(process_mock).toHaveBeenCalledWith(1); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('parses event option', () => { |
|
|
|
|
const res = parse_args(['--events=events.json']); |
|
|
|
|
expect(res.events).toEqual('events.json'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('sets events to null if no option is passed', () => { |
|
|
|
|
const res = parse_args(['']); |
|
|
|
|
expect(res.events).toEqual(null); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|