Skip to content

feat(tests): Improve unit test coverage for Studio services #1246

@sammy200-ui

Description

@sammy200-ui

While exploring the Studio codebase, I noticed that the test coverage for services is quite limited. Currently, only 4 out of 14 services in services have unit tests:

Better test coverage would:

  • Make it safer to refactor code without accidentally breaking things
  • Help catch bugs before they reach production

I noticed this gap while going through the codebase. The existing tests follow a nice pattern using createServices(), so it would be straightforward to add more tests following the same approach

What changes have to be introduced?
Add unit test files for the untested services.

Will this be a breaking change?
No, this only adds new test files. No changes to existing code or APIs.

Services without tests:

  • parser.service.ts
  • app.service.ts
  • specification.service.ts
  • settings.service.ts
  • monaco.service.ts, preview.service.tsx, socket-client.service.tsx, server-api.service.ts

One thing that can also be done here is that to break this issue into multiple prs . If this approach seems valid , i would be happy to complete this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions