Commit d2e1c5d6 by Tomas Dvorak

ParameterParsingTest fix

parent 974c7bf8
......@@ -52,13 +52,14 @@ describe('Parameters parsing', () => {
assert.deepEqual(params.query, {name:'Harry'});
});
it('should recognize unknown collection', async () => {
it('should recognize unknown collection', async (done) => {
try {
await test.runAnalysis({collection:'--unknown--'});
throw new Error('Should fail and be handled in catch branch');
done(new Error('Should throw an exception!'));
} catch(err) {
assert.ok(err.code > 0);
assert.ok(err.stdout.indexOf('The collection specified (--unknown--) in the database specified (test) does not exist or is empty.') > -1);
done();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment