Open vasile-encord opened 1 year ago
Could be because it's not initialised yet, you can try using onRuntimeInitialized
, e.g. with Jest:
import cv from "@techstark/opencv-js";
const openCvLoadTimeout = 25000;
describe("opencvUtils", () => {
beforeAll(
async () =>
// wait for opencv to load
new Promise((resolve) => {
cv.onRuntimeInitialized = () => {
resolve(true);
};
}),
openCvLoadTimeout
);
No meter which method from the lib I call it just paralyse the test and it just stuck. Even if I try to console.log it.
Any ideas why it might happen?