asyncapi / asyncapi/generator

test: Add comprehensive test suite for conditionalGeneration.js

Open
#1,970 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
396
Avg merge
1d 18h
Merged PRs (30d)
26

Description

The lib/conditionalGeneration.js module currently has no test coverage, despite being a critical component that handles conditional file and folder generation based on template configuration. This module contains complex logic for evaluating conditions and determining whether files should be rendered during code generation.

This lack of test coverage poses risks:

Potential regressions when refactoring or adding features
Difficulty understanding expected behavior from code alone
Lower overall code quality and maintainability
Risk of breaking changes going undetected

Related Issues

#1553 - Remove deprecated conditionalFiles configuration

Contributor guide

Open the contributing guide

Research direction

Start by reading lib/conditionalGeneration.js to understand its conditional file and folder generation behavior and identify the branches that need coverage. Add a comprehensive test suite for the module, including condition evaluation and render decisions, and confirm the tests catch regressions in this logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.