Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Dec 6, 2024
1 parent ccd2cce commit 36d62a2
Show file tree
Hide file tree
Showing 3 changed files with 445 additions and 432 deletions.
11 changes: 1 addition & 10 deletions node-hooks/react.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { register } from 'node:module';
import { pathToFileURL } from 'node:url';
import jsdom from 'jsdom';
import 'global-jsdom/register';

register('nodejs-loaders/testing/css-module', pathToFileURL('./'));

// We doesn't need to load any html/css because it's handle by testing-library
const { document } = new jsdom.JSDOM().window;

/**
* Make the JSDOM global objects available to the Node.js environment.
*/
global.document = document;
global.window = document.defaultView;
Loading

0 comments on commit 36d62a2

Please sign in to comment.