Преглед на файлове

Added more order to build tests and utils tests.

Piotrek Koszuliński преди 9 години
родител
ревизия
6c02bf9c06
променени са 4 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 1 1
      bender.js
  2. 6 2
      dev/tasks/build/utils.js
  3. 0 0
      tests/_utils-tests/createsinonsandbox.js
  4. 0 0
      tests/_utils-tests/module__amd.js

+ 1 - 1
bender.js

@@ -29,7 +29,7 @@ const config = {
 			applications: [ 'ckeditor' ],
 			paths: [
 				'build/amd/tests/**',
-				'!build/amd/tests/**/_*/**'
+				'!build/amd/tests/**/@(_utils|_assets)/**'
 			]
 		}
 	},

+ 6 - 2
dev/tasks/build/utils.js

@@ -283,7 +283,7 @@ require( [ 'tests' ], bender.defer(), function( err ) {
 	 * Processes paths of files inside the main CKEditor5 package.
 	 *
 	 * * `src/foo/bar.js` -> `ckeditor5/foo/bar.js`
-	 * * `tests/foo/bar.js` -> `tests/foo/bar.js`
+	 * * `tests/foo/bar.js` -> `tests/ckeditor5/foo/bar.js`
 	 *
 	 * @returns {Stream}
 	 */
@@ -296,7 +296,11 @@ require( [ 'tests' ], bender.defer(), function( err ) {
 				// Replace 'src/' with 'ckeditor5/'.
 				// src/path.js -> ckeditor5/path.js
 				dirFrags.splice( 0, 1, 'ckeditor5' );
-			} else if ( firstFrag != 'tests' ) {
+			} else if ( firstFrag == 'tests' ) {
+				// Insert 'ckeditor5/' after 'tests/'.
+				// tests/foo.js -> tests/ckeditor5/foo.js
+				dirFrags.splice( 1, 0, 'ckeditor5' );
+			} else {
 				throw new Error( 'Path should start with "src" or "tests".' );
 			}
 

tests/utils-tests/createsinonsandbox.js → tests/_utils-tests/createsinonsandbox.js


tests/utils-tests/module__amd.js → tests/_utils-tests/module__amd.js