Fix AST processor tests: handle files.LanguageContent type assertions#3
Fix AST processor tests: handle files.LanguageContent type assertions#3bernardoforcillo wants to merge 1 commit into
Conversation
Unskipped TestASTProcessorErrorHandling and TestASTProcessorWithNestedObjects in internal/processor/tests/processor_deep_test.go. Fixed type assertion failures by handling files.LanguageContent type correctly using a helper function castToLanguageContent. Ensured that tests pass and verify the expected behavior of ASTProcessor when translations fail or when handling nested objects. Co-authored-by: bernardoforcillo <28314446+bernardoforcillo@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR fixes the skipped tests
TestASTProcessorErrorHandlingandTestASTProcessorWithNestedObjectsininternal/processor/tests/processor_deep_test.go.The tests were failing because they asserted that nested maps in the result were of type
map[string]interface{}, butASTProcessor.Executereturnsfiles.LanguageContent(which is a defined type based onmap[string]interface{}).Changes:
TestASTProcessorErrorHandlingandTestASTProcessorWithNestedObjects.castToLanguageContentto robustly cast values tofiles.LanguageContent, handling bothfiles.LanguageContentandmap[string]interface{}types.This ensures that the tests correctly verify the error handling and nested object processing behavior of the AST processor.
PR created automatically by Jules for task 18084114665363459455 started by @bernardoforcillo