diff --git a/deno.json b/deno.json index 68ac818..97e58d3 100644 --- a/deno.json +++ b/deno.json @@ -6,10 +6,7 @@ }, "imports": { - "yoga-layout": "./mod.ts", - "jest": "npm:jest", - "@babel/preset-env": "npm:@babel/preset-env", - "source-map": "npm:source-map" + "yoga-layout": "./mod.ts" }, "test": { diff --git a/mod.ts b/mod.ts index 23c3f6d..aac88fc 100644 --- a/mod.ts +++ b/mod.ts @@ -10,6 +10,11 @@ import type { Layout, Node, Yoga } from "./src/yoga.ts"; import { constants, Direction, Unit } from "./src/yoga_const.ts"; +// hack: for tests +Object.defineProperty(globalThis, "YGBENCHMARK", { + get: () => Deno.test, +}); + let module!: { exports: Yoga }; if (typeof Deno === "object") { @@ -161,11 +166,6 @@ patch( }, ); -// hack: for tests -Object.defineProperty(globalThis, "YGBENCHMARK", { - get: () => Deno.test, -}); - export * from "./src/yoga_const.ts"; export * from "./src/yoga.ts";