Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jest wait for x seconds

jest.setTimeout(30000);

test('some test title', async () => {
  const foo = true;
  await new Promise((r) => setTimeout(r, 2000));
  expect(foo).toBeDefined();
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript roman to integer 
Javascript :: remove all inline css jquery 
Javascript :: jquery initialize 
Javascript :: create-react-app 
Javascript :: npm create-react-app 
Javascript :: javascript throw vs console.error 
Javascript :: javascript check if object is empty 
Javascript :: read directory in node js 
Javascript :: running shell commands javascript 
Javascript :: vue 3 cdn 
Javascript :: react toggle class 
Javascript :: js scroll to bottom 
Javascript :: jquery display block 
Javascript :: node gitignore 
Javascript :: giving height full in next image 
Javascript :: javascript select element with attribute 
Javascript :: javascript array includes another array 
Javascript :: content type json 
Javascript :: jquery select on select 
Javascript :: convert text filed to password field in jquery 
Javascript :: get value onChange from mat-select angular 
Javascript :: disable input field from jquery 
Javascript :: required false jquery 
Javascript :: pass header in ajax 
Javascript :: copyright in javascript 
Javascript :: add bootstrap to react 
Javascript :: regex validate money 
Javascript :: js format price 
Javascript :: window.onload 
Javascript :: js onsubmit prevent default 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =