From 303afc7a4af317ec93de78de95d107782918a1b5 Mon Sep 17 00:00:00 2001 From: sinoon Date: Thu, 3 Mar 2022 11:39:19 +0800 Subject: [PATCH] test: Adding the necessary test cases --- packages/playground/css/__tests__/css.spec.ts | 5 +++++ packages/playground/css/index.html | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/playground/css/__tests__/css.spec.ts b/packages/playground/css/__tests__/css.spec.ts index c37c52eabdf52a..360e46dbbba150 100644 --- a/packages/playground/css/__tests__/css.spec.ts +++ b/packages/playground/css/__tests__/css.spec.ts @@ -364,3 +364,8 @@ test('minify css', async () => { expect(cssFile).toMatch('rgba(') expect(cssFile).not.toMatch('#ffff00b3') }) + +test('import css in less', async () => { + expect(await getColor('.css-in-less')).toBe('yellow') + expect(await getColor('.css-in-less-2')).toBe('blue') +}) diff --git a/packages/playground/css/index.html b/packages/playground/css/index.html index 8716f47eb8bf85..43b19157c36567 100644 --- a/packages/playground/css/index.html +++ b/packages/playground/css/index.html @@ -107,10 +107,10 @@

CSS

Inlined import - this should NOT be red.

- test for import css in less with SFC, color will be yellow + test import css in less, this color will be yellow
- test for import less in less with SFC, color will be blue + test for import less in less, this color will be blue