Skip to content

Commit

Permalink
Feature test on module.register as noted in #3577
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 10, 2024
1 parent b34c7a0 commit 1ebebc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test_node/MdxTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
// See https://github.com/nodejs/node/issues/47747
import test from "node:test";
import assert from "node:assert";
import { register } from "node:module";
import module from "node:module";
import { renderToStaticMarkup } from "react-dom/server";

import Eleventy from "../src/Eleventy.js";

register("@mdx-js/node-loader", import.meta.url);
if ("register" in module) {
module.register("@mdx-js/node-loader", import.meta.url);
}

test("Eleventy with MDX", async () => {
let elev = new Eleventy("./test/stubs-fancyjs/test.mdx", undefined, {
Expand Down

0 comments on commit 1ebebc8

Please sign in to comment.