From da177eb8ae0d8a8efcf9e6f95c92c706e917c3af Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 14 May 2024 18:55:52 +0800 Subject: [PATCH] test(e2e): enable CSS Modules import loaders case --- e2e/cases/css/import-loaders/index.test.ts | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/e2e/cases/css/import-loaders/index.test.ts b/e2e/cases/css/import-loaders/index.test.ts index 77f90330aa..c4ff6870b2 100644 --- a/e2e/cases/css/import-loaders/index.test.ts +++ b/e2e/cases/css/import-loaders/index.test.ts @@ -1,20 +1,16 @@ import { build } from '@e2e/helper'; -import { webpackOnlyTest } from '@e2e/helper'; -import { expect } from '@playwright/test'; +import { expect, test } from '@playwright/test'; -webpackOnlyTest( - 'should compile CSS Modules which depends on importLoaders correctly', - async () => { - const rsbuild = await build({ - cwd: __dirname, - }); - const files = await rsbuild.unwrapOutputJSON(); +test('should compile CSS Modules which depends on importLoaders correctly', async () => { + const rsbuild = await build({ + cwd: __dirname, + }); + const files = await rsbuild.unwrapOutputJSON(); - const content = - files[Object.keys(files).find((file) => file.endsWith('.css'))!]; + const content = + files[Object.keys(files).find((file) => file.endsWith('.css'))!]; - expect(content).toEqual( - '.class-foo-yQ8Tl7+.hello-class-foo{background-color:red}.class-bar-TVH2T6 .hello-class-bar{background-color:blue}', - ); - }, -); + expect(content).toEqual( + '.class-foo-yQ8Tl7+.hello-class-foo{background-color:red}.class-bar-TVH2T6 .hello-class-bar{background-color:blue}', + ); +});