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', () => {