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
27 lines
639 B
JavaScript
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
|
|
});
|
|
});
|
|
});
|