Skip to content

Commit

Permalink
Fixed process.exit() template bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrd committed May 5, 2016
1 parent 799c759 commit 52c52f9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dotdashpay/rpcgen/templates/nodejs.examples.source.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ describe("{{service.name}}", function() {
// @test-end()
{% endif %}
{% endfor%}

{% if not is_example %}
process.exit(0);
{% endif %}

{% if not is_example and resp.type == "COMPLETION" %}

process.exit(0);
{% endif %}
// @test()
callbacksVisited++;
{% if resp.type == "COMPLETION" %}
Expand All @@ -65,6 +63,10 @@ describe("{{service.name}}", function() {
{% endfor %}
.onError(function (errorData) {
console.log("Error", JSON.stringify(errorData));
{% if not is_example %}

process.exit(0);
{% endif %}
// @test()
fail(null, null, "This example should never return an error");
// @test-end()
Expand Down

0 comments on commit 52c52f9

Please sign in to comment.