You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding tests to NetworkNode.ts I noticed that setTankData isn't returning elevation as I would have expected.
The below test is failing for elevation. Will need to confirm what is going on.
Noticed that changing to imperial units makes things off by a factor of 10, while in metric returns comes back as 3.048
test('set and get tank values',()=>{constmodel=newProject(ws);model.init('report6.rpt','out6.bin',FlowUnits.LPS,HeadLossType.HW);//Create NetworkconsttankId=model.addNode('N1',NodeType.Tank);model.setTankData(tankId,10,1,0,5,3.2,1,'');constelevation=model.getNodeValue(tankId,NodeProperty.Elevation);constminLevel=model.getNodeValue(tankId,NodeProperty.MinLevel);constmaxLevel=model.getNodeValue(tankId,NodeProperty.MaxLevel);consttankDiam=model.getNodeValue(tankId,NodeProperty.TankDiam);constminVolume=model.getNodeValue(tankId,NodeProperty.MinVolume);expect(elevation).toEqual(10);expect(minLevel).toEqual(0);expect(maxLevel).toEqual(5);expect(tankDiam).toEqual(3.2);expect(minVolume).toEqual(1);});
✕ set and get tank values (5ms)
Epanet Network Node Functions › Impliment Methods › set and get tank values
expect(received).toEqual(expected) // deep equality
Expected: 10
Received: 3.048
The text was updated successfully, but these errors were encountered:
Thanks @cdzuwa for letting me know! I didn't get a chance to dive into this but good to know it was fixed upstream.
At this stage, I'm going to keep epanet-js locked to public release so not sure if I'll do a hotfix on my library until 2.3 or something else.
Going to jump back into this library soon and try to get test coverage up.
Adding tests to NetworkNode.ts I noticed that setTankData isn't returning elevation as I would have expected.
The below test is failing for elevation. Will need to confirm what is going on.
Noticed that changing to imperial units makes things off by a factor of 10, while in metric returns comes back as 3.048
The text was updated successfully, but these errors were encountered: