Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DjDeveloperr committed Oct 29, 2024
1 parent 9d0640e commit 887a95b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
10 changes: 5 additions & 5 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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";

Expand Down

0 comments on commit 887a95b

Please sign in to comment.