mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
9 lines
431 B
JavaScript
9 lines
431 B
JavaScript
import {calcPowerLossPercent} from "./ElectricalCalculators";
|
|
|
|
describe('calcPowerLossPercent Function Tests', () => {
|
|
test('should correctly calculate power loss percentage', () => {
|
|
// Parameters: isSAE, volts, amps, resistancePerKm, length
|
|
const percent = calcPowerLossPercent(true, 120, 8.33, 2.58, 200);
|
|
expect(percent).toBeCloseTo(7.16, 2); // Use expected correct value and precision
|
|
});
|
|
});
|