diff options
Diffstat (limited to 'tools/comments-test.js')
| -rw-r--r-- | tools/comments-test.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/comments-test.js b/tools/comments-test.js index 6801f44..5a73e6f 100644 --- a/tools/comments-test.js +++ b/tools/comments-test.js @@ -5,7 +5,7 @@ // are caught at the socket; nothing is published. // // Run: bun tools/comments-test.js -import puppeteer from 'puppeteer-core'; +import puppeteer from './puppeteer.js'; import { SimplePool } from 'nostr-tools/pool'; import { buildHtml } from '../build.js'; const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); @@ -23,7 +23,7 @@ for (let i = 0; i < 3 && !(root && comments.length); i++) { if (!root || !comments.length) { console.log(' ✗ the article or its comments are gone from the relays', !!root, comments.length); process.exit(1); } const html = await buildHtml({ minify: true, pwa: false }); const server = Bun.serve({ port: 5283, fetch: () => new Response(html, { headers: { 'content-type': 'text/html' } }) }); -const browser = await puppeteer.launch({ executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] }); +const browser = await puppeteer.launch({ relays: 'read', executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] }); const page = await browser.newPage(); // The article and its comments, fetched above, are also handed to the app // on every relay socket that asks for them: the app reaching the same public |
