make script fail without a hostname

master
Conduitry 6 months ago
parent 096e30ce0c
commit 7fe2a3466e
  1. 5
      index.js

@ -1,5 +1,10 @@
import { firefox } from 'playwright-core';
if (process.argv.length !== 3) {
console.log('Usage: <hostname>');
process.exit(1);
}
const browser = await firefox.launch();
const context = await browser.newContext();
const page = await context.newPage();

Loading…
Cancel
Save