Files
workspace/code/fms/.playwright-cli/check-module5.mjs
T
2026-08-20 22:38:37 +08:00

22 lines
833 B
JavaScript

import { chromium } from 'playwright-core'
const BASE = 'http://localhost:5082'
const browser = await chromium.launch({
headless: true,
executablePath: `${process.env.LOCALAPPDATA}\\ms-playwright\\chromium-1232\\chrome-win64\\chrome.exe`,
})
const page = await browser.newPage()
// fetch from within the page context with cache bypass — mirrors what the browser module loader would get
const out = await page.evaluate(async () => {
const res = await fetch(`http://localhost:5082/src/components/ui/splitter/splitter.vue?t=${Date.now()}`, { cache: 'no-store' })
const text = await res.text()
const i = text.indexOf('panelItems')
return {
status: res.status,
hasCamelize: text.includes('camelize'),
snippet: text.slice(i - 200, i + 400),
}
})
console.log(JSON.stringify(out, null, 2))
await browser.close()