-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathGremlinClientTest.js
More file actions
25 lines (21 loc) · 886 Bytes
/
GremlinClientTest.js
File metadata and controls
25 lines (21 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Client from '../src/GremlinClient';
describe('GremlinClient', () => {
describe('.construct()', () => {
it('should allow setting the `port` option', () => {
const client = new Client(8183);
client.on('error', (err) => {}); //catch error
client.port.should.equal(8183);
});
it('should allow setting the `host` option', () => {
const client = new Client(8182, "otherhost");
client.on('error', (err) => {}); //catch error
client.host.should.equal('otherhost');
});
it('should allow setting session option', () => {
const client = new Client(8182, "localhost", {session:true});
client.port.should.equal(8182);
client.host.should.equal('localhost');
client.options.session.should.equal(true);
});
});
});