fix(workbench): show single expense distribution chart
This commit is contained in:
15
web/tests/donut-chart.test.mjs
Normal file
15
web/tests/donut-chart.test.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const donutChart = readFileSync(
|
||||
fileURLToPath(new URL('../src/components/charts/DonutChart.vue', import.meta.url)),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
test('donut chart supports hiding its built-in legend without changing the default', () => {
|
||||
assert.match(donutChart, /showLegend: \{ type: Boolean, default: true \}/)
|
||||
assert.match(donutChart, /v-if="showLegend" class="donut-legend"/)
|
||||
assert.match(donutChart, /donut-chart--legendless/)
|
||||
})
|
||||
Reference in New Issue
Block a user