Skip to content

Commit 3a52bb5

Browse files
committed
clarify Wh test
1 parent c07d9e6 commit 3a52bb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit-tests/type/unit/Unit.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)