-
Notifications
You must be signed in to change notification settings - Fork 145
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
Re-factor assessment store to inject the initialAssessmentStoreDataGenerator dependency #463
Re-factor assessment store to inject the initialAssessmentStoreDataGenerator dependency #463
Conversation
…ers/haonliu/assessment-store-refactor
const assessmentData = config.getAssessmentData(this.state); | ||
if (assessmentData.generatedAssessmentInstancesMap == null) { | ||
return; | ||
} |
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 change is not absolutely necessary in this PR but I figured to make it since I was working within the test for this and found it odd that it was not behaving per whatever was sent in the payload. Since this is hidden behind a non-public feature flag, I would feel comfortable moving forward with this.
…reated/persisted data
@@ -27,6 +28,9 @@ const assessmentWithColumns: Assessment = { | |||
title: 'assessment 1', | |||
gettingStarted: null, | |||
guidance: content.assessment1.guidance, | |||
initialDataCreator: () => { |
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.
does it make sense to extract this function?
Pull request checklist
npm run test
)<rootDir>/test-results/unit/coverage
npm run precheckin
)Description of changes
Since a lot of tests are dependent on assessment store data builder, we have to make changes to many tests to ensure that they don't break. A lot of them are dependent on some state being given by the store data builder so we've gone with an internal mock approach, although not fully ideal, to return the state as expected.