diff --git a/playground/rolldown-dev-react/__tests__/basic.spec.ts b/playground/rolldown-dev-react/__tests__/basic.spec.ts index 23324567dc3c9a..36d9b3f99abc72 100644 --- a/playground/rolldown-dev-react/__tests__/basic.spec.ts +++ b/playground/rolldown-dev-react/__tests__/basic.spec.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { expect, test } from 'vitest' import { editFile, isBuild, page, viteTestUrl } from '../../test-utils' test('basic', async () => { @@ -10,6 +10,24 @@ test('basic', async () => { await page.getByText('[alias] test-alias-dest:ok').click() }) +test('style', async () => { + expect( + await page + .locator('.test-style') + .evaluate((el) => getComputedStyle(el).color), + ).toBe('rgb(255, 165, 0)') + expect( + await page + .locator('.test-style-url') + .evaluate((el) => getComputedStyle(el).color), + ).toBe('rgb(255, 165, 0)') + expect( + await page + .locator('.test-style-inline') + .evaluate((el) => getComputedStyle(el).color), + ).toBe('rgb(255, 165, 0)') +}) + test.runIf(!isBuild)('hmr', async () => { await page.goto(viteTestUrl) await page.getByRole('button', { name: 'Count: 0' }).click()