smartpuppeteer/test/test.ts
2021-08-17 15:22:10 +02:00

20 lines
614 B
TypeScript

import { expect, tap } from '@pushrocks/tapbundle';
import * as smartpuppeteer from '../ts/index';
tap.test('first test', async (tools) => {
const headlessBrowser = await smartpuppeteer.getEnvAwareBrowserInstance({
forceNoSandbox: true,
});
const page = await headlessBrowser.newPage();
await headlessBrowser.close();
});
tap.test('should get and stop an Incognito browser', async () => {
const incognitoInstance = new smartpuppeteer.IncognitoBrowser();
await incognitoInstance.start();
const page = await incognitoInstance.browser.newPage();
await incognitoInstance.stop();
})
tap.start();