Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

[WIP] Test for merge function #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions __test__/node-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ test('Test create node', (assert) => {
});
});

test('Test merge node', (assert) => {
OGMNeoNode.merge({ name: 'name1', tes: 3, array: ['das']}, 'test').then((node) => {
assert.notEqual(node, null);
assert.notEqual(node.id, null);
assert.deepEqual(node.name, 'name1');
assert.deepEqual(node.tes, 3);
nodeId = node.id;
assert.end();
});
});

test('Test create node with DATE param', (assert) => {
OGMNeoNode.create({ name: 'name1', date: new Date(), array: ['das']}, 'test')
.then((node) => {
Expand All @@ -34,6 +45,17 @@ test('Test create node with DATE param', (assert) => {
});
});

test('Test merge node with DATE param', (assert) => {
OGMNeoNode.merge({ name: 'name1', date: new Date(), array: ['das']}, 'test')
.then((node) => {
assert.notEqual(node, null);
assert.notEqual(node.id, null);
assert.deepEqual(node.name, 'name1');
assert.notEqual(node.date, null);
assert.end();
});
});

test('Test update node', (assert) => {
OGMNeoNode.update({ id: nodeId, tes: 52 }).then((node) => {
assert.notEqual(node, null);
Expand Down
Loading