diff --git a/tests/components/donut-metric-card.test.tsx b/tests/components/donut-metric-card.test.tsx index 60b93ce..166b7fb 100644 --- a/tests/components/donut-metric-card.test.tsx +++ b/tests/components/donut-metric-card.test.tsx @@ -4,9 +4,11 @@ import { describe, expect, it } from 'vitest'; import { DonutMetricCard } from '../../src/components/DonutMetricCard/DonutMetricCard'; import { donutArcPath } from '../../src/components/DonutMetricCard/donut-arc'; -const styles = readFileSync(new URL('../../src/styles/components.css', import.meta.url), 'utf8'); -const tileContract = readFileSync(new URL('../../src/styles/tile-contract.css', import.meta.url), 'utf8'); -const tokens = readFileSync(new URL('../../src/styles/ui-tokens.css', import.meta.url), 'utf8'); +// Line endings depend on the checkout (CRLF on Windows working copies); the contract is about content. +const readStyle = (file: string) => readFileSync(new URL(`../../src/styles/${file}`, import.meta.url), 'utf8').replace(/\r\n/g, '\n'); +const styles = readStyle('components.css'); +const tileContract = readStyle('tile-contract.css'); +const tokens = readStyle('ui-tokens.css'); describe('DonutMetricCard binding design contract', () => { it('renders the shared full-circle reference with a bold count above a regular percentage', () => {