python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to mock reducers/store on react-testing-library for all tests
In my tests I normally mock each and every dispatch/selector needed for each specific test. But I have one prop on my reducers/store that applies to almost all components. I always import it directly ...
Gabrielle
Votes: 0
Answers: 0
Issues with mock + multiple exports in the same file on react-testing-library
I am using Jest + React Testing Library in my project, and in one of my components, I have a common index.ts that exports all the internal components like:
src/components/commonComponents/index.ts:
im...
Gabrielle
Votes: 0
Answers: 0
Testing Toast with Activity Scenario Rule
I am currently new to Android programming and I am trying to test parts of UI using espresso. Currently, I have a problem with a testing toast message.
Toast toast = Toast.makeText(context, R.string.s...
Biggy Poopa
Votes: 0
Answers: 0
How to Unit Test a ViewModel using Flows and LiveData with runTest?
Imagine my ViewModel looks like this :
class ViewModelA(
repository: Repository,
ioCoroutineDispatcher: CoroutineDispatcher,
) : ViewModel() {
val liveData : LiveData<String> = repos...
Nino DELCEY
Votes: 0
Answers: 1