-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Tests for SaveInterface.js #4402
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
Conversation
|
@walterbender @Commanderk3 I think this needd to be refactored once again before merging as there are many redundant mock activities |
|
Okay I will change it. Thanks 👍 |
|
@walterbender Code is refactored. Please review the PR. |
|
@omsuneri I followed your suggestion. Now there are less describe blocks |
|
@Commanderk3 seems good 👍 |
|
@Commanderk3 its fine to have a multiple describe block in a test actually when i read a doc about test its always better to have a multiple describe as when a file is too large like block.js i m unable to set up all the functions' test in a single describe. |
|
Is this expected? Error: Not implemented: window.prompt |
Yeah, but I will try to come up with a solution to avoid this error. The tests were passing so I kept this on low priority. |
|
I think something like this will help: But then I see some other errors: |
|
✅ All Jest tests passed! This PR is ready to merge. |
@walterbender Thank you, it is working. The problem was with the prompt. It was breaking the code because Jest can't replicate the browser environment. Therefore when the prompt is triggered it sets the filename back to "undefined" from "My project.abc" It should set the default file name as "My Project.abc" when no file name is passed. |
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
|
I have to modify the test according to the new changes in master branch. |
|
✅ All Jest tests passed! This PR is ready to merge. |
|
✅ All Jest tests passed! This PR is ready to merge. |
|
Anything else? It is still marked as DRAFT. |
Yeah, I am writing tests for Save MIDI. |
|
✅ All Jest tests passed! This PR is ready to merge. |
|
✅ All Jest tests passed! This PR is ready to merge. |
|
@walterbender I am done with the tests. I had to mock the midi library, and it took some time to figure it out. |

This PR brings test suite for js/Saveinterface.js
@walterbender Please review this PR. A total of 30 tests are written covering all the functions.