GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — TypeScript/scripts/browserIntegrationTest.js at main · lowr/TypeScript Expand file tree/ Copy pathbrowserIntegrationTest.jsMore file actions 57 lines (48 loc) · 1.67 KB / Copy pathbrowserIntegrationTest.jsFile metadata and controls57 lines (48 loc) · 1.67 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 // @ts-check const chalk = require("chalk"); const { join } = require("path"); const { readFileSync } = require("fs"); try { // eslint-disable-next-line import/no-extraneous-dependencies require("playwright"); } catch (error) { throw new Error("Playwright is expected to be installed manually before running this script"); } // eslint-disable-next-line import/no-extraneous-dependencies const playwright = require("playwright"); // Turning this on will leave the Chromium browser open, giving you the // chance to open up the web inspector. const debugging = false; (async () => { for (const browserType of ["chromium", "firefox"]) { const browser = await playwright[browserType].launch({ headless: !debugging }); const context = await browser.newContext(); const page = await context.newPage(); const errorCaught = err => { console.error(chalk.red("There was an error running built/typescript.js in " + browserType)); console.log(err.toString()); process.exitCode = 1; }; page.on("error", errorCaught); page.on("pageerror", errorCaught); await page.setContent(` <html> <script>${readFileSync(join("built", "local", "typescript.js"), "utf8")}</script> </html> `); if (!debugging) { await browser.close(); } else { console.log("Not closing the browser, you'll need to exit the process in your terminal manually"); } console.log(`${browserType} :+1:`); } })(); process.on("unhandledRejection", (/** @type {any}*/ err) => { if (err) { console.error(err.stack || err.message); } process.exit(1); }); |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |