I am using jest to run my test suite (with back-end as Node.js & express). Below is my code:
const puppeteer = require ('puppeteer');
test('testing login function', async () => {
const browser = await puppeteer.launch ({
headless: true,
args: ['--no-sandbox']
});
const page = await browser.newPage();
await page.type('#username', 'admin');
await page.type('#password', 'password');
await page.click('login-button');
await page.waitFor('.card');
expect(texthead).toEqual('Welcome to webpage');
await browser.close();
});
I am trying to run this same test multiple times at once, is there a way using it by jest, or maybe using other tools.