import assert from 'node:assert/strict' import { readFile } from 'node:fs/promises' const root = new URL('../src/views/m/crm/product/', import.meta.url) const list = await readFile(new URL('index.vue', root), 'utf8') const detail = await readFile(new URL('detail.vue', root), 'utf8') const form = await readFile(new URL('form.vue', root), 'utf8') const formDialog = await readFile( new URL('../src/components/business/product-form-dialog/index.vue', import.meta.url), 'utf8' ) const order = [' list.indexOf(token) ) assert.ok( order.every((index) => index >= 0), '产品列表必须使用四个共享展示原语' ) assert.deepEqual( [...order].sort((a, b) => a - b), order, '列表必须依次为搜索、Tab、三栏筛选、卡片' ) assert.match(list, /