We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b6059d commit 78490a5Copy full SHA for 78490a5
test/observable.js
@@ -0,0 +1,25 @@
1
+import { createClient } from '../';
2
+import { assert } from 'chai';
3
+
4
5
+describe('.observable()', function () {
6
+ it('should return an Observable', function () {
7
+ const client = createClient();
8
9
+ const marko = 'marko';
10
+ const query = `g.V().has('name', '${marko}').valueMap()`;
11
12
+ const results$ = client.observable(query);
13
14
+ let vertex;
15
+ let error;
16
+ results$.subscribe(
17
+ (result) => vertex = result,
18
+ (err) => error = err,
19
+ () => {
20
+ assert.isUndefined(error);
21
+ assert.deepPropertyVal(vertex, 'name[0]', marko);
22
+ }
23
+ )
24
+ });
25
+});
0 commit comments