import fs from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' const currentDir = path.dirname(fileURLToPath(import.meta.url)) const pagePath = path.resolve(currentDir, '../../admin/src/views/fans/qywx.vue') const source = fs.readFileSync(pagePath, 'utf8') function expect(condition, message) { if (!condition) throw new Error(message) } expect(source.includes('