Explorar el Código

Renamed `SAME` to lower case.

Oskar Wrobel hace 9 años
padre
commit
ca46965a33

+ 2 - 2
packages/ckeditor5-utils/src/comparearrays.js

@@ -11,7 +11,7 @@
  * a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned
  * it means that arrays differ.
  *
- *		compareArrays( [ 0, 2 ], [ 0, 2 ] );		// 'SAME'
+ *		compareArrays( [ 0, 2 ], [ 0, 2 ] );		// 'same'
  *		compareArrays( [ 0, 2 ], [ 0, 2, 1 ] );		// 'prefix'
  *		compareArrays( [ 0, 2 ], [ 0 ] );			// 'extension'
  *		compareArrays( [ 0, 2 ], [ 1, 2 ] );		// 0
@@ -35,7 +35,7 @@ export default function compareArrays( a, b ) {
 	// Both arrays were same at all points.
 	if ( a.length == b.length ) {
 		// If their length is also same, they are the same.
-		return 'SAME';
+		return 'same';
 	} else if ( a.length < b.length ) {
 		// Compared array is shorter so it is a prefix of the other array.
 		return 'prefix';

+ 2 - 2
packages/ckeditor5-utils/tests/comparearrays.js

@@ -9,13 +9,13 @@ import compareArrays from '/ckeditor5/utils/comparearrays.js';
 
 describe( 'utils', () => {
 	describe( 'compareArrays', () => {
-		it( 'should return SAME flag, when arrays are same', () => {
+		it( 'should return same flag, when arrays are same', () => {
 			let a = [ 'abc', 0, 3 ];
 			let b = [ 'abc', 0, 3 ];
 
 			let result = compareArrays( a, b );
 
-			expect( result ).to.equal( 'SAME' );
+			expect( result ).to.equal( 'same' );
 		} );
 
 		it( 'should return prefix flag, when all n elements of first array are same as n first elements of the second array', () => {