Photo by Christina @ on Unsplash
  1. Three things
  • Test suites (describe block)
  • Test cases (test or it block)
  • Test Assertion (expect block)
  • shallow(render only parent)
  • mount (deep rendering(render also children)
  • render(static rendering(HTML))
  • expect().toBeTruthy()
  • expect().find().toBeLength()

a. Test assertion for functions

  • toHaveBeenCalledTimes() how many times a function called
  • toHaveBeenCalledWith() to verify arguments
wrapper.find('input').at(1).simulate('change', { target: { name: 'height', value: 70 } });
  • simulating in Enzyme same as firing event in RTL
  • .simulate

Redux store work flow
  • Redux thunk Middleware
function createThunkMiddleware(extraArgument) { 
return ({ dispatch, getState }) => (next) => (action) => {
if(typeof action === 'function') {
return action(dispatch, getState, extraArgument);
return next(action);
const thunk = createThunkMiddleware();
thunk.withExtraArgument = createThunkMiddleware;
export default thunk;

Git cheat Sheet

Photo by Florian Olivo on Unsplash

Common characteristics

  1. Both are primitive data types
  2. Both are falsy values.[If you don’t know falsy values in javascript, just google it]
  3. Both are used as value and also as a type means [if x is a typeof ‘undefined’ then its value must be undefined]
  4. Both are used for variables that values do not exist.[Interviewer will ask here then what is the difference b/w both of them]

A noob interviewee answer

  • typeof null = ‘object’[due to legacy reasons] & typeof undefined = ‘undefined’ 😂

An experienced interview answer

  1. Javascript never implicitly assigns null value to any variable but does implicitly assigns undefined…

Difference b/w Padding & Margin in CSS
  • Padding is the difference b/w content(text) of element and border of the same element;
  • Padding increases then element size also increases but content (text) remains the same.
  • While Margin is difference b/w the two elements.
  • Margin describes shifting w.r.t. other element or browser window.

Photo by Kevin Ku on Unsplash
  1. Graph
Graphs Videos for Beginners.

using namespace std;
int printn(int n){
return 0;
cout<<”* “;
void fun1(int m,int i){
return ;
int main(){
int n;
return 0;

The program must accept a string S and an integer N as the input. The program must print the desired pattern as shown below:

Arvind Dhakar

Programmer, Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store