Category "tdd"

error when Add a stub for a method using Mockito's 'when' API

Have this abstract class to get data from remote data source abstract class NumberTriviaRemoteDataSource { /// Calls the http://numberapi.com/{number} endpoin

How can I share snapshots between Jest tests?

Using TDD I'd like to write some new tests that create data in slightly different ways, and verify that that test data gets sanitized down to the same data as a

Testing functions with arguments in React with Jest Enzyme

I have a function named toggleFilter() in a react component which looks like this: toggleFilter = (filterType, filterName) => { const filterApplied

Cannot return objects in @dataProvider PHPUnit

Is it allowed to return objects from @dataProviders to test methods? public function iOsMessages() { return [ 'update available' => [1,

TDD for an algorithm involving randomness

I would like to try out test-driven development, but the project I am working on involves a lot of randomness and I am very unsure about how I can test it. Here