← back to Wallpaper Tour
smoketest.mjs
14 lines
// Verify Playwright launches via createRequire (CJS bridge)
import { createRequire } from 'node:module';
const require = createRequire('/Users/macstudio3/Projects/animals/');
const { chromium } = require('playwright');
console.log('Imported playwright OK');
const b = await chromium.launch({ headless: true });
console.log('Browser launched');
const ctx = await b.newContext({ viewport: { width: 1600, height: 900 } });
const p = await ctx.newPage();
await p.goto('https://silkwallpaper.com', { waitUntil: 'domcontentloaded', timeout: 15000 });
console.log('Loaded:', await p.title());
await b.close();
console.log('OK');