From 5610109fb3cce3b8650e3057cc2eaebdd933f2ad Mon Sep 17 00:00:00 2001 From: Aliullov Vlad Date: Wed, 11 Dec 2024 11:54:32 +0400 Subject: [PATCH] rename and fix test (T1265287) --- .../src/modules/bootstrap-extractor.ts | 4 ++-- .../tests/modules/bootstrap-extractor.test.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts b/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts index 1a58722efc7..cd845886452 100644 --- a/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts +++ b/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts @@ -83,10 +83,10 @@ ${this.input} ${this.getSetterServiceCode('!default')} ${this.getCollectorServiceCode()}`; - return this.clearFromImports(result); + return this.removeImports(result); } - clearFromImports(content: string): string { + removeImports(content: string): string { return content.replace(/^@import "variables-dark";.*$/gm, ''); } diff --git a/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts b/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts index f238300def7..893de90e742 100644 --- a/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts +++ b/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts @@ -41,12 +41,14 @@ describe('BootstrapExtractor', () => { expect(result.includes('@import "variables-dark";')).toBeFalsy(); - expect(result).toBe(`${functions.toString()} + const expectedResult = `${functions.toString()} ${variables.toString()} ${variablesDark.toString()} ${testSassString} ${setterServiceCode} -${collectorServiceCode}`); +${collectorServiceCode}`; + + expect(result).toBe(extractor.removeImports(expectedResult)); }); test('getSetterServiceCode', () => {