-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test beta env #370
base: master
Are you sure you want to change the base?
Test beta env #370
Conversation
Codecov Report
@@ Coverage Diff @@
## master #370 +/- ##
=======================================
Coverage 91.41% 91.41%
=======================================
Files 27 27
Lines 1072 1072
=======================================
Hits 980 980
Misses 92 92 |
test_prod/razorpay.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename the folder to e2e
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have renamed the folder to e2e
test_prod/razorpay.js
Outdated
class RazorpayTest extends Razorpay { | ||
constructor(options) { | ||
super(options) | ||
this.api.rq = request.defaults({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass hostUrl
as options in constructor of Razorpay itself ?
By default, it would be api.razorpay.com
else it can be https://api-web.dev.razorpay.in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added hostUrl in options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean adding it in RazorpayTest but in Razorpay class. In that case, we don't need RazorpayTest itself. We can directly use Razorpay by passing hostUrl.
Sorry for this confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realised that adding it in class Razorpay would have other problems since that is a public API. Let's keep this as such for now.
e2e/razorpay.js
Outdated
const Razorpay = require("../dist/razorpay"); | ||
let request = require('request-promise'); | ||
|
||
class RazorpayTest extends Razorpay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename this Class to RazorpayBeta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with one comment
This reverts commit 282d7ef.
'use strict'; | ||
|
||
const Razorpay = require("../dist/razorpay"); | ||
let request = require('request-promise'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: we can use const here?
Created Test Razorpay instance for test url