Skip to content

Commit

Permalink
feat: add unit tests for order charges (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjanrak committed Jan 9, 2023
1 parent 9c34f72 commit 13e1d1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/kiteconnect-mocks
8 changes: 6 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function testSuite(){

// orderMargins
.post("/margins/orders")
.query({ mode: "compact" })
.query({ mode: null })
.reply(200, parseJson("order_margins.json"))


Expand Down Expand Up @@ -658,12 +658,16 @@ function testSuite(){
"order_type": "MARKET",
"quantity": 1
}
], "compact")
])
.then(function(response) {
expect(response).to.have.nested.property("[0].type");
expect(response).to.have.nested.property("[0].var");
expect(response).to.have.nested.property("[0].span");
expect(response).to.have.nested.property("[0].exposure");
// Order charges
expect(response).to.have.nested.property("[0].charges.total");
expect(response).to.have.nested.property("[0].charges.transaction_tax");
expect(response).to.have.nested.property("[0].charges.gst.total");
return done();
}).catch(done);
})
Expand Down

0 comments on commit 13e1d1d

Please sign in to comment.