Skip to content

Commit

Permalink
fix: bump Deno to v1.39.1, stop stubbing vm.isContext
Browse files Browse the repository at this point in the history
`vm.isContext()` has been changed to always return `false` in [[email protected]](https://github.com/denoland/deno/releases/tag/v1.39.1). This library also follows that change.
  • Loading branch information
uki00a committed Dec 29, 2023
1 parent 5717416 commit 2c94209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .deno-version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
1.38.2

1.39.1
12 changes: 1 addition & 11 deletions components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ export * from "./deps/testing-library.ts";
import type { Options } from "./deps/testing-library.ts";
import { userEvent } from "./deps/testing-library.ts";

import vm from "node:vm";

function createJSDOM() {
const isContext = vm.isContext;
vm.isContext = () => false;
const jsdom = new JSDOM();
vm.isContext = isContext;
return jsdom;
}

/**
* This function sets up the DOM environment to make Testing Library work.
*
Expand All @@ -30,7 +20,7 @@ function createJSDOM() {
export function setup() {
if (globalThis.document) return;

const jsdom = createJSDOM();
const jsdom = new JSDOM();
const { document } = jsdom.window;
globalThis.document = document;
setUpClipboard();
Expand Down

0 comments on commit 2c94209

Please sign in to comment.