11/**
22 * @license
3- * Copyright (c) 2021, Oracle and/or its affiliates.
3+ * Copyright (c) 2021, 2023, Oracle and/or its affiliates.
44 * Licensed under The Universal Permissive License (UPL), Version 1.0
55 * as shown at https://oss.oracle.com/licenses/upl/
66 * @ignore
@@ -34,50 +34,50 @@ describe('general utilities', function () {
3434 expect ( utils . equals ( 1 , 'a string' ) ) . to . equal ( false ) ;
3535 expect ( utils . equals ( [ 1 , 2 , 3 ] , { one : 'value' } ) ) . to . equal ( false ) ;
3636 } ) ;
37-
37+
3838 it ( 'returns true when comparing equal scalars' , function ( ) {
3939 expect ( utils . equals ( undefined , undefined ) ) . to . equal ( true ) ;
4040 expect ( utils . equals ( 1 , 8 - 7 ) ) . to . equal ( true ) ;
4141 expect ( utils . equals ( true , true ) ) . to . equal ( true ) ;
4242 } ) ;
43-
43+
4444 it ( 'returns false when comparing unequal scalars' , function ( ) {
4545 expect ( utils . equals ( true , false ) ) . to . equal ( false ) ;
4646 expect ( utils . equals ( 'abcd' , 'xyz' ) ) . to . equal ( false ) ;
4747 expect ( utils . equals ( 1 , 5 ) ) . to . equal ( false ) ;
4848 } ) ;
49-
49+
5050 it ( 'returns false when comparing unequal objects' , function ( ) {
5151 expect ( utils . equals ( { first : 1 , second : 'both' } , { first : 1 , second : 'neither' } ) ) . to . equal ( false ) ;
5252 expect ( utils . equals ( { first : 1 , second : 'both' } , { second : 'both' , first : 1 , third : null } ) ) . to . equal ( false ) ;
5353 expect ( utils . equals ( { first : { nest : 1 } , second : 'both' } , { second : 'both' , first : [ 1 ] } ) ) . to . equal ( false ) ;
5454 } ) ;
55-
55+
5656 it ( 'returns true when comparing equal objects' , function ( ) {
5757 expect ( utils . equals ( { first : 1 , second : 'both' } , { first : 1 , second : 'both' } ) ) . to . equal ( true ) ;
5858 expect ( utils . equals ( { first : 1 , second : 'both' } , { second : 'both' , first : 1 } ) ) . to . equal ( true ) ;
5959 expect ( utils . equals ( { first : { nest : 1 } , second : 'both' } , { second : 'both' , first : { nest : 1 } } ) ) . to . equal ( true ) ;
6060 } ) ;
61-
61+
6262 it ( 'returns true when comparing unequal arrays' , function ( ) {
6363 expect ( utils . equals ( [ 1 , 2 , 3 ] , [ 3 , 1 , 2 ] ) ) . to . equal ( false ) ;
6464 expect ( utils . equals ( [ { age : 12 , height : 50 } ] , [ { age : 12 , height : 60 } ] ) ) . to . equal ( false ) ;
6565 } ) ;
66-
66+
6767 it ( 'returns true when comparing equal arrays' , function ( ) {
6868 expect ( utils . equals ( [ 1 , 2 , 3 ] , [ 1 , 2 , 3 ] ) ) . to . equal ( true ) ;
6969 expect ( utils . equals ( [ { age : 12 , height : 50 } ] , [ { age : 12 , height : 50 } ] ) ) . to . equal ( true ) ;
7070 } ) ;
7171 } ) ;
72-
72+
7373 // Kubernetes uses a modified version of the DNS-1123 standard.
7474 describe ( 'Kubernetes names' , function ( ) {
7575 it ( 'recognizes legal Kubernetes names' , function ( ) {
7676 expect ( utils . isLegalK8sName ( 'aa' ) ) . to . be . true ;
7777 expect ( utils . isLegalK8sName ( 'aa-bb-cc' ) ) . to . be . true ;
7878 expect ( utils . isLegalK8sName ( 'aa12-b3' ) ) . to . be . true ;
7979 } ) ;
80-
80+
8181 it ( 'recognizes illegal Kubernetes names' , function ( ) {
8282 expect ( utils . isLegalK8sName ( 7 ) ) . to . be . false ;
8383 expect ( utils . isLegalK8sName ( 'Aa' ) ) . to . be . false ;
@@ -97,12 +97,13 @@ describe('general utilities', function () {
9797 it ( 'converts illegal to legal names' , function ( ) {
9898 expect ( utils . toLegalK8sName ( 'AA' ) ) . to . equal ( 'aa' ) ;
9999 expect ( utils . toLegalK8sName ( 'aa_bb-cc' ) ) . to . equal ( 'aa-bb-cc' ) ;
100+ expect ( utils . toLegalK8sName ( 'aa_bb_cc' ) ) . to . equal ( 'aa-bb-cc' ) ;
100101 expect ( utils . toLegalK8sName ( 'aa12.b3' ) ) . to . equal ( 'aa12-b3' ) ;
101102 expect ( utils . toLegalK8sName ( 'aa12$b3' ) ) . to . equal ( 'aa12-b3' ) ;
102103 expect ( utils . toLegalK8sName ( '--aa' ) ) . to . equal ( 'aa' ) ;
103104 expect ( utils . toLegalK8sName ( 'aa--' ) ) . to . equal ( 'aa' ) ;
104105 expect ( utils . toLegalK8sName ( 'aa-bb-cc-dd-ee-ff-gg-hh-ii-jj-kk-ll-mm-nn-oo-pp-qq-rr-ss-tt-uu-vv-ww-xx-yy-zz' ) )
105- . to . equal ( 'aa-bb-cc-dd-ee-ff-gg-hh-ii-jj-kk-ll-mm-nn-oo-pp-qq-rr-ss-tt-uu- ' ) ;
106+ . to . equal ( 'aa-bb-cc-dd-ee-ff-gg-hh-ii-jj-kk-ll-mm-nn-oo-pp-qq-rr-ss-tt-uu' ) ;
106107 } ) ;
107108 } ) ;
108109} ) ;
0 commit comments