/** *@license *Copyright2025GoogleInc. *SPDX-License-Identifier:Apache-2.0
*/ importassert from 'node:assert'; import fs from 'node:fs'; import {mkdtemp} from 'node:fs/promises'; import os from 'node:os'; import path from 'node:path';
describe('userDataDir', function () { for (const pipe of [true, false]) {
it(`should not launch the browser twice with the same userDataDir with pipe=${pipe}`, async () => { const userDataDir = await mkdtemp(TMP_FOLDER); const {browser, close} = await launch({userDataDir, pipe}); // Open a page to make sure its functional. try {
await browser.newPage();
expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.