Files
rods/solver-api/tests/solverClient.test.js
Conner Majic 2a6cee21f8 fix: normalize engineering checks across units
Convert pump-depth vs rod-length mismatch gating to meter-equivalent comparisons, add imperial coverage, and correct rod material mapping with exported helper tests while refreshing related GUI/docs copy.

Made-with: Cursor
2026-04-16 23:28:00 -06:00

27 lines
639 B
JavaScript

import { describe, expect, it } from "vitest";
import { rodTypeToProps } from "../src/solverClient.js";
describe("solverClient rod type mapping", () => {
it("maps fiberglass rod type 3 to fiberglass properties", () => {
expect(rodTypeToProps(3)).toEqual({
E: 5.5e9,
rho: 1900
});
});
it("maps sinker and steel rod types to steel-like properties", () => {
expect(rodTypeToProps(2)).toEqual({
E: 2.05e11,
rho: 7850
});
expect(rodTypeToProps(0)).toEqual({
E: 2.05e11,
rho: 7850
});
expect(rodTypeToProps(1)).toEqual({
E: 2.05e11,
rho: 7850
});
});
});