Skip to content

Refactor tableGeneration() to improve testing coverage. #220

@digitalghost-dev

Description

@digitalghost-dev

In types.go, the tableGeneration() function currently creates the table model and runs the BubbleTea program in the same function. This makes it difficult to test with teatest because the model creation logic can't be accessed separately.

This function will be split into two separate functions:

  • func createTypeSelectionTable() model {}
    • This will focus on creating and returning the table as a BubbleTea model
  • func runTypeSelectionTable(endpoint string) error {}
    • This will focus on running the above model

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRefactoring existing code.testsIssues related to tests.

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions