-
Notifications
You must be signed in to change notification settings - Fork 30k
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
lib: add validation for options in compileFunction #56023
lib: add validation for options in compileFunction #56023
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56023 +/- ##
==========================================
+ Coverage 87.95% 87.99% +0.03%
==========================================
Files 656 656
Lines 188372 188960 +588
Branches 35979 35975 -4
==========================================
+ Hits 165687 166275 +588
- Misses 15851 15854 +3
+ Partials 6834 6831 -3
|
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.
would you mind adding a test case for this? thank you!
4cdcf53
to
bda151e
Compare
bda151e
to
8df7b68
Compare
@legendecas I added a test case, can you please check it? |
Landed in 56c8360 |
PR-URL: #56023 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #56023 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #56023 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #56023 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #56023 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This PR adds a validation step for the options parameter in the compileFunction method within lib/vm.js.
The validateObject function is used to ensure that options is an object, aligning with the validation approach used in other functions like measureMemory in lib/vm.js.