-
Notifications
You must be signed in to change notification settings - Fork 64
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
✨ Feat(pk: unit testing): Add workspace support for monorepos #865
base: master
Are you sure you want to change the base?
Conversation
Adds ability to configure Jest rootDir through options for monorepo setups while maintaining backward compatibility with existing single-repo configurations.
Clarified the usage of the rootDir option in the Jest configuration examples for both ACP and SUITEAPP project types, enhancing documentation for better understanding.
…ion in Jest Expanded the documentation for the `rootDir` property in Jest configuration, providing clear examples for both standard project structures and monorepo setups. This update aims to improve user understanding and ease of configuration.
Added a method to automatically detect the workspace root for Jest configurations, enhancing support for monorepo setups. The customStubs property is now initialized with an empty array if not provided, and the rootDir is determined using the new detection method or falls back to the provided option. This improves flexibility and usability for users managing multiple projects.
…onorepo support Revised the documentation for the `rootDir` property in Jest configuration, emphasizing its optional nature and improved automatic detection in monorepo setups. Added detailed examples for both standard and monorepo project structures, highlighting how Jest now scopes tests and resolves modules across workspaces without manual configuration. This update aims to enhance user understanding and streamline configuration processes.
Thank you for your contribution to the repository! We greatly appreciate the time and effort you’ve invested in this merge request. Our team will review your submission promptly to ensure it aligns with our project goals and guidelines. We’ll keep you updated throughout the review process, and if we have any questions or suggestions, we’ll reach out to you here directly. Thank you again for contributing and helping us improve the project! |
Of course! Let me know if you need any changes! 👉 |
Revised the README.md for the unit testing package to replace the link to CORE_STUBS with a new reference to the comprehensive stubs documentation. Additionally, introduced a new README.md file in the stubs directory, detailing all available SuiteScript 2.x stubs, their methods, and usage examples. This update enhances clarity and accessibility of information for users implementing unit tests with SuiteCloud.
…nd crypto operations Updated unit testing stubs to improve test coverage and functionality. Refactored existing tests to perform actual record, search, and crypto operations instead of mocking. This includes implementing realistic scenarios for loading and saving records, executing search operations with mock results, and performing encryption with specified algorithms. These changes aim to provide more robust testing capabilities and better simulate real-world usage.
Add Monorepo Support for Jest Configuration 🚀
Overview
This PR adds automatic workspace/monorepo detection to the SuiteCloud Jest configuration, making it easier to work with SuiteCloud projects in monorepo setups while maintaining backward compatibility for existing single-repo users.
Changes
rootDir
resolution that:rootDir
if specifiedTesting
The changes have been tested with:
Usage
No changes required for existing users. For monorepo users, the configuration will automatically detect the workspace root and configure Jest appropriately.
Example
Notes
roots
configuration