microsoft / microsoft/nodejstools
Callback not working for tests
Open
Nobody has claimed this yet.
test-adapter
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 355
- PR merge metrics
- No merged PRs in 30d
Description
The test is not able to handle callbacks properly. Callback in never executed.
exports['AddvertexTest'] = function () {
addVertex();
}
function addVertex() {
console.log('Running Add Vertex1');
client.execute("g.addV('person').property('id', 'thomas').property('firstName', 'Thomas').property('age', 44).property('userid', 1)", {}, (err, results) => {
**if (err) {
assert.ok(false, "Vertex adition failed");
}
console.log("Result: %s\n", JSON.stringify(results));
assert.ok(true, "Vertex adition Successful!!");**
});
}
dropVertex() and addVertex() execute request asynchronously with callbacks. The tests does not execute the callback.
Expected Behavior
Execute callback
Actual Behavior
Callback not executed.
- NTVS Version: 1.3
- Visual Studio Version: 2015
- Node.js Version:
Steps to Reproduce
- Add test with callbacks
- run the test.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report's entry point is the supplied AddvertexTest/addVertex reproduction; first run it in the stated NTVS 1.3 and Visual Studio 2015 context and inspect whether the asynchronous request reaches its callback. Done means the callback executes and the success or failure assertions behave as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100