@@ -54,14 +54,17 @@ describe34("Manipulating views", function() {
5454 const properties = await view . setProperties ( {
5555 consolidationPolicy : {
5656 type : "count" ,
57- threshold : 123
57+ threshold : 0. 123
5858 }
5959 } ) ;
6060 expect ( properties ) . to . have . property ( "name" , view . name ) ;
6161 expect ( properties ) . to . have . property ( "links" ) ;
6262 expect ( properties ) . to . have . property ( "consolidationPolicy" ) ;
6363 expect ( properties . consolidationPolicy ) . to . have . property ( "type" , "count" ) ;
64- expect ( properties . consolidationPolicy ) . to . have . property ( "threshold" , 123 ) ;
64+ expect ( properties . consolidationPolicy ) . to . have . property ( "threshold" ) ;
65+ expect ( properties . consolidationPolicy . threshold . toFixed ( 3 ) ) . to . equal (
66+ "0.123"
67+ ) ;
6568 } ) ;
6669 } ) ;
6770 describe ( "view.replaceProperties" , ( ) => {
@@ -71,22 +74,28 @@ describe34("Manipulating views", function() {
7174 const oldProps = await view . replaceProperties ( {
7275 consolidationPolicy : {
7376 type : "bytes" ,
74- threshold : 123
77+ threshold : 0. 123
7578 }
7679 } ) ;
77- expect ( oldProps . consolidationPolicy ) . to . have . property ( "threshold" , 123 ) ;
80+ expect ( oldProps . consolidationPolicy ) . to . have . property ( "threshold" ) ;
81+ expect ( oldProps . consolidationPolicy . threshold . toFixed ( 3 ) ) . to . equal (
82+ "0.123"
83+ ) ;
7884 expect ( oldProps . consolidationPolicy ) . to . have . property ( "type" , "bytes" ) ;
7985 const properties = await view . replaceProperties ( {
8086 consolidationPolicy : {
8187 type : "fill" ,
82- threshold : 456
88+ threshold : 0. 456
8389 }
8490 } ) ;
8591 expect ( properties ) . to . have . property ( "name" , view . name ) ;
8692 expect ( properties ) . to . have . property ( "links" ) ;
8793 expect ( properties ) . to . have . property ( "consolidationPolicy" ) ;
8894 expect ( properties . consolidationPolicy ) . to . have . property ( "type" , "fill" ) ;
89- expect ( properties . consolidationPolicy ) . to . have . property ( "threshold" , 456 ) ;
95+ expect ( properties . consolidationPolicy ) . to . have . property ( "threshold" ) ;
96+ expect ( properties . consolidationPolicy . threshold . toFixed ( 3 ) ) . to . equal (
97+ "0.456"
98+ ) ;
9099 } ) ;
91100 } ) ;
92101 describe ( "view.rename" , ( ) => {
0 commit comments