smartpuppeteer/test/test.ts
2021-11-07 15:58:45 +01:00

20 lines
615 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();