Test mit Jest
Das AI generierte mocking ignorieren, und sauber, wie davor.
This commit is contained in:
@@ -93,7 +93,9 @@ function optimizeRobot(listFoundMarkers, jsonRobot) {
|
||||
...entry,
|
||||
n: 0,
|
||||
average: null,
|
||||
deviation: null
|
||||
deviation: null,
|
||||
result: "X",
|
||||
status: "ok"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -104,12 +106,17 @@ function optimizeRobot(listFoundMarkers, jsonRobot) {
|
||||
...entry,
|
||||
n,
|
||||
average,
|
||||
deviation
|
||||
deviation,
|
||||
result: "X",
|
||||
status: "ok"
|
||||
};
|
||||
});
|
||||
withStats.status = "ok";
|
||||
withStats.result = "X";
|
||||
|
||||
return withStats;
|
||||
}
|
||||
|
||||
function calculateRotationAngle(listIdAndX, jsonRobot, jointName, method = "tan") {
|
||||
// Achse finden
|
||||
const jointInfo = jsonRobot.Joints[jointName];
|
||||
@@ -212,4 +219,16 @@ async function calculate(foundMarkers, jsonRobot) {
|
||||
}
|
||||
|
||||
|
||||
module.exports = { calculate, optimizeRobot };
|
||||
// export { calculate, optimizeRobot };
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
window.calculate = calculate;
|
||||
window.optimizeRobot = optimizeRobot;
|
||||
}
|
||||
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = {
|
||||
calculate,
|
||||
optimizeRobot
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user