File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
test/unit-tests/type/unit Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1089,13 +1089,13 @@ describe('Unit', function () {
10891089 } )
10901090
10911091 it ( 'should be able to combine W and h into Wh' , function ( ) {
1092- // by default, this converts to J, due to the default unit system
1092+ // by default, this converts to J, due to the default unit system using J for ENERGY
10931093 const n1 = 2
10941094 const n2 = 3
10951095 const unit1 = new Unit ( n1 , 'W' )
10961096 const unit2 = new Unit ( n2 , 'h' )
1097- const unitM = unit1 . multiply ( unit2 ) . to ( 'Wh' )
1098- assert . strictEqual ( unitM . units [ 0 ] . unit . name , 'Wh ' )
1097+ const unitM = unit1 . multiply ( unit2 ) . simplify ( )
1098+ assert . strictEqual ( unitM . units [ 0 ] . unit . name , 'J ' )
10991099 assert . strictEqual ( unitM . value , n1 * n2 * 3600 )
11001100 } )
11011101
You can’t perform that action at this time.
0 commit comments