zhou zhou
2026-03-30 3fdcf1d5e6468c735532e67bde5ff1cdf85bb0c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import assert from 'node:assert/strict'
import fs from 'node:fs'
import path from 'node:path'
import test from 'node:test'
import { fileURLToPath } from 'node:url'
 
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const projectRoot = path.resolve(__dirname, '..')
const workTabSource = fs.readFileSync(
  path.join(projectRoot, 'src/components/core/layouts/art-work-tab/index.vue'),
  'utf8'
)
 
test('work tabs only render the leading icon when a tab actually has an icon', () => {
  assert.match(workTabSource, /<ArtSvgIcon\s+v-if="item\.icon"/)
  assert.doesNotMatch(workTabSource, /<ArtSvgIcon\s+v-show="item\.icon"/)
})