Brijesh619 commented on code in PR #732:
URL: https://github.com/apache/atlas/pull/732#discussion_r3830299329


##########
dashboard/jest.config.js:
##########
@@ -36,6 +36,7 @@ const config = {
   
   // Module name mapping for path aliases
   moduleNameMapper: {

Review Comment:
   While all tests do pass without the moduleNameMapper on newer Node versions, 
removing the mock entirely forces the full AST parser to run across hundreds of 
unrelated tests that only need basic <script> stripping, which adds unnecessary 
overhead.
   
   Instead of completely removing it, I kept the moduleNameMapper for 
performance but updated the mock to dynamically use 
jest.requireActual('sanitize-html/index.js') whenever _options are passed. This 
gives us the best of both worlds: fast, basic mocking for the bulk of the test 
suite, while ensuring that any integration tests actually using 
sanitizeHtmlContent configuration bypass the mock and fully exercise the real 
upgraded library.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to