Files
pda-uniapp/tests/h5-button-reset.test.mjs
2026-08-28 10:03:40 +08:00

11 lines
455 B
JavaScript

import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
const styles = await readFile(new URL('../styles/pda.scss', import.meta.url), 'utf8')
test('H5 uni-button removes the framework pseudo-element border globally', () => {
assert.match(styles, /button::after,\s*uni-button::after\s*\{[^}]*border:\s*0 !important;/)
assert.match(styles, /button:focus-visible,[\s\S]*?outline:\s*3px solid/)
})