You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the Integer class exposes no constructor, it's not possible to create Integer instances to use in mocked query responses when writing unit tests for code that deals with Neo4j records.
Is there a recommended alternative solution for mocking Neo4j query responses?
This issue is semi-related to #245, as I believe this and many other use cases would be simplified if the driver offered an option assume all numbers coming back from the database are within the safe 32 bit number range.
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks for reporting this problem. I think JSDoc is incorrect in this case. Integer does have some from* methods but they are all marked with @access private. Readme suggests using int function https://github.com/neo4j/neo4j-javascript-driver#read-integers, sample code would be:
As the Integer class exposes no constructor, it's not possible to create Integer instances to use in mocked query responses when writing unit tests for code that deals with Neo4j records.
Is there a recommended alternative solution for mocking Neo4j query responses?
The top of the Integer docs page suggests that there is a way of constructing Integers using the listed 'from*' functions, but I can't find any further reference to these on the page. http://neo4j.com/docs/api/javascript-driver/current/class/src/v1/integer.js~Integer.html
This issue is semi-related to #245, as I believe this and many other use cases would be simplified if the driver offered an option assume all numbers coming back from the database are within the safe 32 bit number range.
Thanks!
The text was updated successfully, but these errors were encountered: