import test from 'node:test' import assert from 'node:assert/strict' import fs from 'node:fs' import path from 'node:path' const homeFile = path.resolve('pages/home.vue') test('首页活动分类每页展示两行八个图标', () => { const source = fs.readFileSync(homeFile, 'utf8') assert.match(source, /const TYPEGRID_PAGE_SIZE\s*=\s*8/) assert.match(source, /\.typegrid-swiper\s*\{[\s\S]*?height:\s*360rpx/) assert.match(source, /\.typegrid-page\s*\{[\s\S]*?flex-wrap:\s*wrap/) })