Skip to content
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

Fix: Previewer module config #650

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

oatymart
Copy link
Contributor

@oatymart oatymart commented May 24, 2024

Unit test was failing:
Screenshot 2024-05-24 at 10 59 59

CI action has been failing because of this for 4 months! https://github.com/oat-sa/extension-tao-item/actions/workflows/continuous-integration.yaml


The problem was an incorrect refactoring while removing lodash here.

Fix: the config received by the previewerFactory should be mutated, not reassigned.

To test: npx grunt connect:test taoitemstest

Copy link

Version

Target Version 12.2.3
Last version 12.2.2

There are 0 BREAKING CHANGE, 0 feature, 1 fix

Copy link

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
29 29 0 0

@@ -44,8 +44,8 @@ define([
* @param {Object} [config.previewers] - Optionally load static adapters. By default take them from the module's config.
* @returns {Promise}
*/
function previewerFactory(type, uri, state, config) {
config = Object.assign({}, module.config(), config || {});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to lodash removal, line was:

config = _.defaults(config || {}, module.config());

@oatymart oatymart self-assigned this May 24, 2024
@oatymart oatymart merged commit d49be75 into develop May 24, 2024
5 of 6 checks passed
@oatymart oatymart deleted the fix/repair-previewer-unit-test branch May 24, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants