-
Notifications
You must be signed in to change notification settings - Fork 0
Async test result #549
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
base: main
Are you sure you want to change the base?
Async test result #549
Conversation
|
|
||
| const countScrapedResult = testResults.length; | ||
|
|
||
| //testResults[0] is the test cases (not test results) most of the time but not always |
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.
If users were to do a print statement, this would mess with the computation right?
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.
This implementation also currently assumes that we don't have other results type such as runtime errors / memory exceeded, etc. Did you plan to do this as a follow up?
| testExpectedOutputs.length !== numCases | ||
| ) { | ||
| console.error( | ||
| "Variables are undefined or tests do not match up", |
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.
A bit confusing since the log line is the same as groupTestCases.
| } | ||
|
|
||
| interface ResultAssignment { | ||
| input: Record<string, string>; |
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 perhaps reuse the same interface? https://github.com/nickbar01234/codebuddy/pull/549/files#diff-96d91a7cf927d8a78ffc02453d6987162a4f8d07c9ffe8c1269a3ee75c168652R13-R16. I also think some problems do not have variables, i.e OOP-related questions
| {selected ? ( | ||
| passed ? ( | ||
| <button className="bg-fill-3 dark:bg-dark-fill-3 hover:bg-fill-2 dark:hover:bg-dark-fill-2 hover:text-label-1 dark:hover:text-dark-label-1 text-label-1 dark:text-dark-label-1 relative inline-flex items-center whitespace-nowrap rounded-lg px-4 py-1 text-sm font-semibold focus:outline-none"> | ||
| V Case {idx + 1} |
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.
What is V? May be we can use an icon component instead?
Description
Async test result when one buddy click Run button of Leetcode
Screenshots
Test
Click Run code on one buddy and wait a bit to see the Test Result tab filled out on the other.
Checklist
If you're making changes to the extension, please run through the following checklist to make sure that we don't have
any regressions. Note that we plan to add integration tests in the future!
Possible Downsides
Additional Documentations