-
Notifications
You must be signed in to change notification settings - Fork 890
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
Test file for Synthutils.js added #4199
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Justin Charles <[email protected]>
@walterbender please review this as the babel.config.js will be needed to write some other tests too. |
I am seeing:
(node:505714) [DEP0040] DeprecationWarning: The |
@walterbender you need to install tone.js locally for it to run. That's probably why you are facing those errors as the synthutilsjs file uses tone.js for testing. |
Isn't tone.js already installed as part of MB? Or does it need to be installed as an NPM package as well? |
@walterbender it needs to be installed as an NPM package using npm install tone.js |
FAIL js/utils/tests/synthutils.test.js
Test Suites: 1 failed, 5 passed, 6 total |
@walterbender this error is arising because you don't have babel dependencies installed as an npm package |
I guess my question is, how is one to know what npm dependencies are missing? |
I installed babel and still got the same error. |
@walterbender The error ReferenceError: regeneratorRuntime is not defined occurs because the async/await syntax requires the regeneratorRuntime, which is missing in your current environment. This typically happens when Babel isn't correctly set up to inject the required runtime or when dependencies like @babel/runtime are missing. |
I guess to identify necessary dependencies, reviewing the source code for advanced syntax (e.g., async/await, JSX) or library-specific imports and analyzing configuration files like Jest and Babel for required plugins (e.g., @babel/plugin-transform-runtime) and presets (e.g., @babel/preset-env) could be the answer or what we could do is create a section in the readme which would address all the dependencies that would be needed to install in the environment for the tests to work, this might help as there are going to be various tests written on various files. |
still doesn't work for me. |
@walterbender should I close this pr and create a new one with all the dependencies to be installed listed down together? |
worth a try |
Description:
This pull request addresses issue #4124 for including test files.
Changes Made:
The test file for synthutils.js has been added through this pull request. It addresses all the functions present in the synthutils.js file.
Screenshots:
Checklist: