-
-
Notifications
You must be signed in to change notification settings - Fork 125
feat(scripts): add testing for React/Redux challenges #308
base: dev
Are you sure you want to change the base?
feat(scripts): add testing for React/Redux challenges #308
Conversation
3fc6029
to
b4ad532
Compare
@@ -38,6 +38,9 @@ const schema = Joi.object().keys({ | |||
isRequired: Joi.bool(), | |||
name: Joi.string(), | |||
order: Joi.number(), | |||
react: Joi.bool(), | |||
reactRedux: Joi.bool(), |
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.
Why are you adding these properties to the schema?
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.
evaluateTest uses them to determine if it needs to add react, redux and so on to the test environment. In order for that to happen, they have to be present in the challenge object (or the validation step will fail) and that means they have to be in the schema.
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.
Understood, is there a way to strip them out of the challenges on build? We are trying to keep the package size to a minimum.
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 I understand correctly, you don't want these properties making their way into the dist folder - since they're not used outside of testing. That can be done, by modifying the gulpfile, but the build process doesn't (currently) involve validation. In other words, the schema isn't enforced.
Does it seem reasonable to add filtering and validation to the build process? That way all the properties that're currently omitted when learn
reads the challenges instead never make it into the build of curriculum
.
@@ -36,7 +36,10 @@ | |||
"config": "commitizen.config.js" | |||
} | |||
}, | |||
"dependencies": {}, | |||
"dependencies": { | |||
"enzyme-adapter-react-16": "^1.5.0", |
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.
These should be devDependencies
.
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.
Yeah, stupid mistake on my part. Should I git commit --amend it or is it best to just push another commit?
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.
Another commit is fine
ISSUES CLOSED: #305
Description
This includes modern challenges in the test suite. The test suite in
curriculum
is now closer to the test runnerlearn
though it still ignores async tests.Pre-Submission Checklist
dev
branch.fix/
,feature/
, ortranslate/
(e.g.fix/challenge-tests
)npm test
.npm run commit
to generate a conventional commit message.Learn more here: https://conventionalcommits.org/#why-use-conventional-commits
If they were done on the web interface you have ensured that you are creating conventional commit messages.
Checklist: