Browse Source

Tests: Added test for builder compileThemes util to ensure the order of compiled theme files.

Aleksander Nowodzinski 9 years ago
parent
commit
4b918c1d80
1 changed files with 7 additions and 5 deletions
  1. 7 5
      dev/tests/build/utils.js

+ 7 - 5
dev/tests/build/utils.js

@@ -623,12 +623,12 @@ describe( 'build-utils', () => {
 				const files = [
 					new Vinyl( {
 						cwd: './',
-						path: 'foo/bar/theme.scss',
+						path: 'aaa/aaa/theme.scss',
 						contents: new Buffer( '' )
 					} ),
 					new Vinyl( {
 						cwd: './',
-						path: 'baz/qux/theme.scss',
+						path: 'zzz/ckeditor5-theme-quz/theme.scss',
 						contents: new Buffer( '' )
 					} ),
 					new Vinyl( {
@@ -667,9 +667,11 @@ describe( 'build-utils', () => {
 				}, () => {
 					expect( compiledThemePath ).to.be.equal( 'abc.css' );
 					expect( compiledThemeCss.toString() ).to.be.equal(
-`/*! C:\\win\\dows\\theme.scss */
-/*! baz/qux/theme.scss */
-/*! foo/bar/theme.scss */
+// Note: Order matters. The first one should be ckeditor5-theme-* in order
+// to provide necessary dependencies (mixins, vars) for the following files.
+`/*! zzz/ckeditor5-theme-quz/theme.scss */
+/*! aaa/aaa/theme.scss */
+/*! C:\\win\\dows\\theme.scss */
 ` );
 
 					done();