import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import test from 'node:test' import { fileURLToPath } from 'node:url' const workbench = readFileSync( fileURLToPath(new URL('../src/components/business/PersonalWorkbench.vue', import.meta.url)), 'utf8' ) test('workbench assistant greets the current employee without the old helper tag', () => { assert.doesNotMatch(workbench, /assistant-tag/) assert.doesNotMatch(workbench, /AI 报销助手/) assert.match(workbench, /嗨,\{\{ assistantGreetingName \}\},描述费用或上传票据,AI 直接帮你判断怎么报/) assert.match(workbench, /const assistantGreetingName = computed/) assert.match(workbench, /user\.name/) })