tests - run browser unit tests in default window
This commit is contained in:
parent
5393954877
commit
310c969fce
1 changed files with 2 additions and 3 deletions
|
@ -95,10 +95,9 @@ const testModules = (async function () {
|
|||
async function runTestsInBrowser(testModules, browserType) {
|
||||
|
||||
const browser = await playwright[browserType].launch({ headless: !Boolean(argv.debug) });
|
||||
const context = await browser.newContext();
|
||||
|
||||
const page = (await browser.defaultContext().pages())[0]
|
||||
const target = url.pathToFileURL(path.join(__dirname, 'renderer.html'));
|
||||
const page = await context.newPage(target.href);
|
||||
await page.goto(target.href);
|
||||
|
||||
const emitter = new events.EventEmitter();
|
||||
await page.exposeFunction('mocha_report', (type, data1, data2) => {
|
||||
|
|
Loading…
Reference in a new issue