@@ -33,9 +33,9 @@ describe('kuery functions', function () {
3333 expect ( actualChildNode2 ) . to . be ( childNode2 ) ;
3434 } ) ;
3535
36- it ( 'serializeStyle should default to "implicit "' , function ( ) {
36+ it ( 'serializeStyle should default to "operator "' , function ( ) {
3737 const { serializeStyle } = and . buildNodeParams ( [ childNode1 , childNode2 ] ) ;
38- expect ( serializeStyle ) . to . be ( 'implicit ' ) ;
38+ expect ( serializeStyle ) . to . be ( 'operator ' ) ;
3939 } ) ;
4040
4141 } ) ;
@@ -65,8 +65,8 @@ describe('kuery functions', function () {
6565
6666 describe ( 'toKueryExpression' , function ( ) {
6767
68- it ( 'should serialize "and" nodes with an implicit syntax by default ' , function ( ) {
69- const node = nodeTypes . function . buildNode ( 'and' , [ childNode1 , childNode2 ] ) ;
68+ it ( 'should serialize "and" nodes with an implicit syntax when requested ' , function ( ) {
69+ const node = nodeTypes . function . buildNode ( 'and' , [ childNode1 , childNode2 ] , 'implicit' ) ;
7070 const result = and . toKueryExpression ( node ) ;
7171 expect ( result ) . to . be ( '"response":200 "extension":"jpg"' ) ;
7272 } ) ;
@@ -80,7 +80,7 @@ describe('kuery functions', function () {
8080 it ( 'should wrap "or" sub-queries in parenthesis' , function ( ) {
8181 const orNode = nodeTypes . function . buildNode ( 'or' , [ childNode1 , childNode2 ] , 'operator' ) ;
8282 const fooBarNode = nodeTypes . function . buildNode ( 'is' , 'foo' , 'bar' ) ;
83- const andNode = nodeTypes . function . buildNode ( 'and' , [ orNode , fooBarNode ] ) ;
83+ const andNode = nodeTypes . function . buildNode ( 'and' , [ orNode , fooBarNode ] , 'implicit' ) ;
8484
8585 const result = and . toKueryExpression ( andNode ) ;
8686 expect ( result ) . to . be ( '("response":200 or "extension":"jpg") "foo":"bar"' ) ;
0 commit comments