-
Notifications
You must be signed in to change notification settings - Fork 3
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
Accept expected_minimum in JSON result #108
Accept expected_minimum in JSON result #108
Conversation
…ps://github.com/BoostV/process-optimizer-frontend into feature/expose-expected_minimum-in-the-frontend # Conflicts: # components/next-experiments/next-experiments.tsx
utility/migration/migration.test.ts
Outdated
}) | ||
|
||
it("should migrate to 4 from 3 (expectedMinimum added to result)", () => { | ||
expect(migrate(version2, "4")).toEqual(version4) |
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.
Shouldn't this be migrate(3, 4)?
json = migration.converter(json) | ||
const migrationIndex = MIGRATIONS.findIndex(m => m === migration) | ||
const isLastMigration = migrationIndex === MIGRATIONS.length - 1 | ||
const isLastMigration = migrationIndex === MIGRATIONS.length - 1 || migration.version === stopAtVersion |
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 migrationIndex === MIGRATIONS.length - 1 be removed now that there is a stopAtVersion with a default?
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.
Yes it could be removed, however, I think it would be better to keep it to prevent errors where a user enters a non-existing stopVersion
Expose expected minimum in frontend
This PR depends on BoostV/process-optimizer-api#26 being merged and that the API project version is bumped to 1.4.0
The structure of the expectedMinimum entry is like this:
Closes #106