-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Implemented tests for @optuna/react
#860
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #860 +/- ##
=======================================
Coverage 69.51% 69.51%
=======================================
Files 35 35
Lines 2375 2375
=======================================
Hits 1651 1651
Misses 724 724 ☔ View full report in Codecov by Sentry. |
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.
LGTM with a nit.
@@ -340,7 +340,31 @@ const loadJournalStorage = (arrayBuffer: ArrayBuffer): Optuna.Study[] => { | |||
if (log === "") { | |||
continue | |||
} | |||
const parsedLog: JournalOpBase = JSON.parse(log) | |||
|
|||
const parsedLog: JournalOpBase = (() => { |
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.
Could you add some tests to check this change in the following pull request?
https://github.com/optuna/optuna-dashboard/blob/main/tslib/storage/test/journal.test.mjs
@c-bata |
Contributor License Agreement
This repository (
optuna-dashboard
) and Goptuna share common code.This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.
Reference Issues/PRs
@optuna/react
#851What does this implement/fix? Explain your changes.
vitest
+@testing-library/react
jsdom
for test environment@testing-library/jest-dom
fortoBeInTheDocument
methodtypescript-tests.yml
loadJournalStorage
in@optuna/storage
:NaN
/Infinity
values with strings when parsing fails when they cannot be parsed withJSON.parse()
JournalOperation.SET_TRIAL_STATE_VALUES
, changed implementation so that, when the value is null, it is replaced with undefined according to the original type definitionReference
@testing-library/jest-dom
:Plotly
: