-
Notifications
You must be signed in to change notification settings - Fork 3
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
tests: Add missing tests #29
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set up a modern JavaScript testing framework using Jest, integrated with the existing webpack build system. Configure Babel for modern JavaScript support and establish a test file structure and conventions. Update the package.json to include Jest dependencies and scripts for running tests, watching tests, and generating coverage reports. Set up a continuous integration pipeline to run JavaScript tests alongside existing Python tests. New Features: - Introduce a modern JavaScript testing framework using Jest, integrated with the existing webpack build system. Enhancements: - Configure Babel for modern JavaScript support with a new Babel configuration file. CI: - Set up a continuous integration pipeline to run JavaScript tests alongside existing Python tests. Tests: - Establish a test file structure and conventions for JavaScript tests, including an example test file to verify the setup. - Configure test coverage reporting for JavaScript code. Resolves #27
…s-text into sourcery-ai/issue-27
Reviewer's Guide by SourceryThis pull request adds missing tests to the project, focusing on JavaScript unit tests for the CMS editor functionality and improving test coverage. The changes include setting up Jest testing infrastructure, adding new test files, and making minor code style improvements to existing Python tests. Class diagram for new test classesclassDiagram
class TestGetChildPluginCandidates {
+test_get_child_plugin_candidates_whitelist()
+test_get_child_plugin_candidates_blacklist()
+test_get_child_plugin_candidates_no_whitelist_blacklist()
}
class DynamicAttributesTestCase {
+test_dynamic_href_sets_correct_attribute()
+test_dynamic_src_sets_correct_attribute()
+test_render_dynamic_attributes_changes_html()
+test_render_dynamic_attributes_fails()
+test_render_dynamic_attributes_handles_no_dynamic_attributes()
}
class DjangoCMSPictureIntegrationTestCase {
+setUp()
+test_extract_images()
}
class HtmlSanitizerAdditionalProtocolsTests {
+test_default_tag_escaping()
+test_custom_tag_enabled()
+test_default_attribute_escaping()
+test_custom_attribute_enabled()
+test_default_protocol_escaping()
+test_custom_protocol_enabled()
+test_clean_html_with_sanitize_enabled()
+test_invalid_dynamic_link()
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Add missing tests for plugin actions and HTML sanitization, and introduce Jest for JavaScript testing. Update package.json with Jest dependencies and configure GitHub Actions to run tests and upload coverage reports.
New Features:
Enhancements:
Build:
CI:
Tests: