EmbeddingGemma 2: an open, lightweight multimodal embedding model
deepmind.google·6d ago
TL;DR
A new method for mocking asynchronous and error-prone code using continuations has been developed, allowing for cleaner and more effective testing. This approach simplifies the representation of complex computations into a single data type.
✦ Why It Matters
Implement this continuation-based mocking technique to enhance your testing strategy today.
Key Takeaways
How It Works
The new approach uses a type called Effect to capture calls to the fetch function, allowing tests to assert the order and correctness of these calls without executing them. This method simplifies the testing process by keeping the implementation of fetch consistent across tests and reducing the distance between assertions and their corresponding values.
Related