Skip to content

Conversation

@lifeiscontent
Copy link

This pull request updates the packages/atom/test/Atom.test.ts file to both simplify test code and add extensive new test coverage for the Atom API. The main change is replacing verbose await new Promise((resolve) => resolve(null)) statements with the simpler await Promise.resolve(). Additionally, a large suite of new tests has been added to cover various Atom features, such as mapping, debouncing, context utilities, type guards, modifiers, and special symbols like Reset and Interrupt.

@lifeiscontent
Copy link
Author

ready for review.

expect(Result.isInitial(result2)).toBe(true)
})

it("Interrupt symbol", () => {
Copy link
Owner

Choose a reason for hiding this comment

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

This needs to actually test the functionality.

Copy link
Author

Choose a reason for hiding this comment

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

my bad, turns out I had forgotten to push the latest change. should be good for another review.

Copy link

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 pull request simplifies test code and significantly expands test coverage for the Atom API. The primary changes include replacing verbose promise patterns with cleaner syntax and adding 17 new comprehensive test cases.

  • Refactored await new Promise((resolve) => resolve(null)) to the simpler await Promise.resolve() throughout the test file
  • Added extensive test coverage for Atom features including mapping, debouncing, context utilities, type guards, modifiers, and special symbols
  • Improved test readability and maintainability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lifeiscontent lifeiscontent changed the title Simplify and add more unit tests add more tests and simplify promise use within them Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants