提交 310c969f 编写于 作者: B Benjamin Pasero

tests - run browser unit tests in default window

上级 53939548
......@@ -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) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册