philippkueng / node-neo4j

Neo4j REST API wrapper for Node.js
MIT License
211 stars 44 forks source link

Fix broken tests for 2.0.0-RC1 compatibility #22

Closed philippkueng closed 10 years ago

philippkueng commented 10 years ago

The broken tests are:

  1) Testing Node specific operations for Neo4j
  => Insert an Index -> Insert a non existing index on ONLY ONE property of a label should return the index:
     Uncaught AssertionError: expected { label: 'Person', property_keys: [ 'firstname' ] } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:631:25
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:295:6
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    2) Testing Node specific operations for Neo4j
  => Replace all Labels on a Node -> Replace all labels by multiple new labels should return true if the labels were successfully changed:
     Uncaught AssertionError: expected [ 'Dutch', 'French', 'German' ] to have a length of 4 but got 3
      at Object.Assertion.length (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:607:10)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:920:26
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:89:5
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    3) Testing Node specific operations for Neo4j
  => createUniquenessContstraint: Create a uniqueness constraint on a property -> Create a new uniqueness constraint on a property should return JSON for this constraint:
     Uncaught AssertionError: expected { label: 'User', type: 'UNIQUENESS', property_keys: [ 'email' ] } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:1298:25
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:728:6
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    4) Testing Node specific operations for Neo4j
  => readUniquenessConstraint: Get a specific uniqueness constraint for a label and a property -> Get a specific uniqueness constraint for a label and a property should return an array with one uniqueness constraint:
     Uncaught AssertionError: expected { property_keys: [ 'email' ], label: 'User', type: 'UNIQUENESS' } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:1359:28
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:760:5
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    5) Testing Node specific operations for Neo4j
  => listAllUniquenessConstraintsForLabel: Get all uniqueness constraints for a label -> Get all uniqueness constraints should return an array with two uniqueness constraints:
     Uncaught AssertionError: expected { property_keys: [ 'uid' ], label: 'User', type: 'UNIQUENESS' } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:1435:28
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:794:5
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    6) Testing Node specific operations for Neo4j
  => listAllConstraintsForLabel: Get all constraints for a label -> Get all constraints for a User should return an array with two constraints:
     Uncaught AssertionError: expected { property_keys: [ 'uid' ], label: 'User', type: 'UNIQUENESS' } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:1496:28
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:794:5
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    7) Testing Node specific operations for Neo4j
  => listAllConstraints: Get all constraints -> Get all constraints should return an array with two constraints:
     Uncaught AssertionError: expected { property_keys: [ 'pid' ],
    label: 'Product',
    type: 'UNIQUENESS' } to have a property 'property-keys'
      at Object.Assertion.property (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/should/lib/should.js:632:12)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:1557:28
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:859:5
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    8) Testing Node specific operations for Neo4j
  => Test Cyper Query Functionality against non existing nodes -> Run the cypher query from issue 8 by @electrichead against non existing nodes should return empty data array since no data matches the query:
     Uncaught AssertionError: expected [Error: HTTP Error 400 when running the cypher query against neo4j.
  Question mark is no longer used for optional patterns - use OPTIONAL MATCH instead (line 1, column 31)
  "start a=node(*) with a match a-[r1?:RELATED_TO]->o return a.name,o.name"
                               ^] to not exist
      at onlyResult (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:10:13)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:2120:6
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:1380:6
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)

    9) Testing Node specific operations for Neo4j
  => Test Cypher Query Functionality against existing nodes and relationships -> Run the cypher query from issue 8 by @electrichead against non existing nodes should return a valid response:
     Uncaught AssertionError: expected [Error: HTTP Error 400 when running the cypher query against neo4j.
  Question mark is no longer used for optional patterns - use OPTIONAL MATCH instead (line 1, column 24)
  "START a=node(*) match a-[r1?:RELATED_TO]->o RETURN a.name,o.name"
                        ^] to not exist
      at onlyResult (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:10:13)
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/test/test.main.js:2220:6
      at /Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/main.js:1380:6
      at Request.callback (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:630:3)
      at Request.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:131:10)
      at Request.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (/Users/philippkung/Documents/Programmieren/Nodejs/node-neo4j/node_modules/superagent/lib/node/index.js:773:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:910:16
      at process._tickCallback (node.js:415:13)
philippkueng commented 10 years ago

All the tests are fixed. ...as far as i see it we're RC1 ready. will merge into master now.