Skip to content
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

Raised New PR : (https://github.com/Real-Dev-Squad/discord-slash-commands/pull/98) Added description to the message after using /verify #85 #90

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

shreya-mishra
Copy link
Contributor

@shreya-mishra shreya-mishra commented Jul 1, 2023

Description

after using /verify command, the reply message is showing just a link.

Ticket : Added Description to the message after using /verify

Output: Not adding output as it consist of auth URL!

Adding TestCases of /verify feature !

@shreya-mishra shreya-mishra added enhancement Improving something existing good first issue Good for newcomers review labels Jul 1, 2023
kotesh-arya
kotesh-arya previously approved these changes Jul 1, 2023
Copy link

@kotesh-arya kotesh-arya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good enough for a merge 👍🏻

@sahsisunny
Copy link
Member

Where is the test of the changes?

Copy link
Contributor

@RitikJaiswal75 RitikJaiswal75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests for it.

"@types/node": "^18.11.18",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"eslint": "^8.31.0",
"jest": "^29.3.1",
"jsonwebtoken": "^9.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we installing the jsonwebToken package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to mock cloudfareworker jwt

@@ -0,0 +1,14 @@
"use strict";
import jsonwebtoken from "jsonwebtoken";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this package? It is not being used anywhere so why are we mocking it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we did it afterwards

Copy link
Contributor Author

@shreya-mishra shreya-mishra Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check in latest commit


const response = await sendUserDiscordData(
token,
const response = await sendUserDiscordData( token,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there too much whitespace before token

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed automatically, via eslint

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this blank file

@@ -1,3 +1,4 @@
const crypto = require("crypto");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not require crypto as it is available globally from node 18

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without this line it was giving below error
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but now te issue is, this require is not allowed but when I am using import it gives the same error:/

Comment on lines 21 to 26
// const mockResponse = response.INTERNAL_SERVER_ERROR;
// jest
// .spyOn(global, "fetch")
// .mockImplementation(() =>
// Promise.resolve(new JSONResponse(mockResponse))
// );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the commented code

@shreya-mishra shreya-mishra changed the title Added description to the message after using /verify #85 WIP: Added description to the message after using /verify #85 Jul 18, 2023
@shreya-mishra
Copy link
Contributor Author

Where is the test of the changes?

added

@shreya-mishra shreya-mishra changed the title WIP: Added description to the message after using /verify #85 Raised New PR : (https://github.com/Real-Dev-Squad/discord-slash-commands/pull/98) Added description to the message after using /verify #85 Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving something existing good first issue Good for newcomers review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants