-
Notifications
You must be signed in to change notification settings - Fork 183
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
docs(accounts): added doc blocks #878
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.x #878 +/- ##
=======================================
Coverage 84.14% 84.14%
=======================================
Files 123 123
Lines 1646 1646
Branches 314 314
=======================================
Hits 1385 1385
Misses 260 260
Partials 1 1 ☔ View full report in Codecov by Sentry. |
4a21e95
to
6fefd29
Compare
6fefd29
to
88b4f78
Compare
}; | ||
|
||
nock("https://api.nexmo.com", {reqheaders: {'Authorization': 'Basic YWJjZDoxMjM0'} }) | ||
nock("https://api.nexmo.com", { reqheaders: { 'Authorization': 'Basic YWJjZDoxMjM0' } }) |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical test
authorization header
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 used a randomly generated value to avoid the code scanning issues?
88b4f78
to
24fc0b1
Compare
@@ -42,9 +42,13 @@ describe('accounts', () => { | |||
.query({ api_key: 'abcd', api_secret: '1234' }) | |||
.reply(200, expectedResponse); | |||
|
|||
const lookup = await client.topUpBalance('8ef2447e69604f642ae59363aa5f781b'); | |||
const lookup = await client.topUpBalance( | |||
'8ef2447e69604f642ae59363aa5f781b', |
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.
do we need this hardcoded value in here? I'm not a big fan of hardcoding items - can we use a random generator to create a random account_id and use it?
}; | ||
|
||
const callbacks = {moCallBackUrl: "https://example.com/webhooks/inbound-sms", drCallBackUrl: "https://example.com/webhooks/delivery-receipt"}; | ||
const callbacks = { | ||
moCallBackUrl: "https://example.com/webhooks/inbound-sms", |
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.
same comment re: hardcoded values
import { Auth } from '@vonage/auth'; | ||
|
||
describe('secrets', () => { | ||
let client; | ||
|
||
beforeEach(() => { | ||
client = new Secrets(new Auth({ apiKey: 'abcd', apiSecret: '1234' })); | ||
client = new Secrets(new Auth({ apiKey: 'abcd', apiSecret: '1234' })); |
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.
same comment re: hardcoded values
}; | ||
|
||
nock("https://api.nexmo.com", {reqheaders: {'Authorization': 'Basic YWJjZDoxMjM0'} }) | ||
nock("https://api.nexmo.com", { reqheaders: { 'Authorization': 'Basic YWJjZDoxMjM0' } }) |
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 used a randomly generated value to avoid the code scanning issues?
ee19835
to
e37ea4b
Compare
Description
Motivation and Context
Testing Details
Example Output or Screenshots (if appropriate)
Types of changes
Checklist