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

18 lines
706 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 the served module source directly
const resp = await page.request.get(`${BASE}/src/components/ui/splitter/splitter.vue`)
const text = await resp.text()
console.log('STATUS', resp.status())
console.log('HAS camelize:', text.includes('camelize'))
console.log('HAS default-size note:', text.includes('kebab 属性'))
console.log('----- first 1200 chars -----')
console.log(text.slice(0, 1200))
await browser.close()