npm install --save-dev vitest jsdom- React Testing Library
npm install --save-dev vitest jsdom| #path: b/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java | |
| replace : appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)); | |
| to: | |
| if (Build.VERSION.SDK_INT >= 34 && appCtx.getApplicationInfo().targetSdkVersion >= 34) { | |
| appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), Context.RECEIVER_EXPORTED); | |
| }else{ | |
| appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)); | |
| } |
| # Add in ~/.bashrc or ~/.bash_profile | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| RED="\[\033[01;31m\]" | |
| YELLOW="\[\033[01;33m\]" | |
| GREEN="\[\033[01;32m\]" | |
| BLUE="\[\033[01;34m\]" | |
| NO_COLOR="\[\033[00m\]" |
| import { createSlice } from '@reduxjs/toolkit'; | |
| export const templateSlice = createSlice({ | |
| name: 'name', | |
| initialState: { | |
| counter: 10 | |
| }, | |
| reducers: { | |
| increment: (state, /* action */ ) => { | |
| //! https://react-redux.js.org/tutorials/quick-start |
| /* | |
| In source project create a file babel.config.cjs no babel.config.js how 'https://jestjs.io/docs/getting-started' | |
| */ | |
| module.exports = { | |
| presets: [ | |
| [ '@babel/preset-env', { targets: { esmodules: true } } ], | |
| [ '@babel/preset-react', { runtime: 'automatic' } ], | |
| ], | |
| }; |
| /* | |
| 1.- Add this lines to final android/build.gradle | |
| 2.- 'compileSdkVersion, buildToolsVersion and targetSdkVersion' should have same version to 'buildscript' in the same file | |
| */ | |
| subprojects { | |
| project.configurations.all { | |
| resolutionStrategy.eachDependency { details -> | |
| if (details.requested.group == 'com.android.support' | |
| && !details.requested.name.contains('multidex') ) { |