-
Notifications
You must be signed in to change notification settings - Fork 83
Add _tests
folder with a set of test file to run against the application
#178
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
Comments
You can add test cases in the Something like this should work:
// _files/sum.js
export function sum(a, b) {
return 0; // TODO Fix me
}
// _solution/sum.js
export function sum (a, b) {
return a + b;
}
// templates/default/sum.test.js
test('sum adds numbers', () => {
expect(sum(2, 3)).toBe(5);
}); // package.json
"scripts": {
"test": "<your test runner command here>"
} // meta.md
mainCommand: ["npm run test", "Running tests"] |
@AriPerkkio would that gate users from proceeding to the next lesson (or some other type of indication that they "successfully completed" the challenge)? If not, I think that sort of functionality would be super useful |
We don't yet provide any way for preventing users from proceeding the tutorials without completing previous lessons. I think for this feature we could add support for:
For the test cases we could provide our own |
Yeah that was my idea and i think i like this idea from @AriPerkkio
|
Is your feature request related to a problem?
It would be cool to be able to provide a set of test file that will run against the application to validate if the solution is actually passing.
Describe the solution you'd like.
Add the ability to create a
_test
folder with tests for that specific lesson.Describe alternatives you've considered.
Additional context
No response
The text was updated successfully, but these errors were encountered: