Skip to content

Conversation

@ultmaster
Copy link
Contributor

Summary

  • test for evaluating if attribute on each iteration of a for loop

Testing

  • npm run build-webview
  • npm run build-cli
  • npm run lint
  • npm test
  • python -m pytest python/tests

https://chatgpt.com/codex/tasks/task_e_688a3ef9b05c832eb575d6eee8686b92

Copilot AI review requested due to automatic review settings August 1, 2025 05:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds test cases to verify that the if attribute is properly evaluated on each iteration of a for loop in the template engine. The tests ensure that conditional rendering works correctly within loop contexts.

  • Adds test for if attribute evaluation using loop variable in conditional expressions
  • Adds test for if attribute evaluation using loop metadata (loop.index)
Comments suppressed due to low confidence (2)

packages/poml/tests/file.test.tsx:185

  • [nitpick] The test name 'forLoopIf' should be more descriptive. Consider renaming to 'evaluatesIfAttributeInForLoop' or 'forLoopWithConditionalRendering' to better describe what is being tested.
  test('forLoopIf', async () => {

packages/poml/tests/file.test.tsx:190

  • [nitpick] The test name 'forLoopIfLoopIndex' should be more descriptive. Consider renaming to 'evaluatesIfAttributeUsingLoopIndex' or 'forLoopConditionalWithLoopMetadata' to better describe what is being tested.
  test('forLoopIfLoopIndex', async () => {

@ultmaster ultmaster merged commit d8fc8cc into main Aug 1, 2025
3 checks passed
@ultmaster ultmaster deleted the codex/add-tests-for-if-evaluation-in-loop branch August 27, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants