Skip to content

Commit

Permalink
Update exports tests to use self-referencing.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Sep 27, 2024
1 parent 7534f29 commit 02ae0a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/markdownlint-cli2-test-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"use strict";

const path = require("node:path");
const test = require("ava").default;
const packageJson = require("../package.json");

Expand All @@ -25,7 +24,7 @@ test("exportMappings", (t) => {
for (const [ exportName, exportPath ] of exportMappings) {
test(exportName, (t) => {
t.is(
require(path.join("..", packageJson.exports[exportName])),
require(exportName.replace(/^\./u, packageJson.name)),
require(exportPath)
);
});
Expand Down

0 comments on commit 02ae0a7

Please sign in to comment.