posit-dev / publisher

MIT License
6 stars 1 forks source link

Splitting a bit `homeView` and new tests for `PublisherState` #2447

Closed marcosnav closed 18 hours ago

marcosnav commented 6 days ago

Intent

This PR aims to promote having a better test coverage in the project.

  1. Pulls out some methods from homeView to PublisherState as the responsibility for those operations is better suited there.
  2. Removes the dependency @hypersphere/omnibus and the existing bus instance. Usage of the bus wasn't justifying having it since calls were pretty localized and, on the contrary, complicated creating tests.
  3. Pulled in fishery and created some factories to create instances of data for tests.
  4. Included some new mock factory methods for vscode instances of ExtensionContext.
  5. Adding new tests for PublisherState methods making use of all the previous points above.

User Impact

No functional impact for the end user.

Automated Tests

This is all about it.

Directions for Reviewers

No specific directions. Open to feedback.

Checklist

sagerb commented 6 days ago

Really like to see the removal of the bus for just function calls since everything is in Home View

Yes, this makes sense since we have moved away from the multiple classes, which required the bus for notifications.