mirror of
https://github.com/hanzoai/eslint.git
synced 2026-10-30 19:38:10 +00:00
* refactor: Remove eslintrc from flat config functionality * Fix knip error * Fix knip again * Update lib/shared/relative-module-resolver.js Co-authored-by: Francesco Trotta <[email protected]> * Remove unused file --------- Co-authored-by: Francesco Trotta <[email protected]>
28 lines
623 B
JavaScript
28 lines
623 B
JavaScript
/**
|
|
* @fileoverview Tests for relative module resolver.
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const { assert } = require("chai");
|
|
const path = require("node:path");
|
|
const ModuleResolver = require("../../../lib/shared/relative-module-resolver.js");
|
|
|
|
describe("ModuleResolver", () => {
|
|
describe("resolve()", () => {
|
|
it("should correctly resolve a relative path", () => {
|
|
assert.strictEqual(
|
|
ModuleResolver.resolve(
|
|
"./file2.js",
|
|
path.resolve(
|
|
"./tests/fixtures/relative-module-resolver/file.js",
|
|
),
|
|
),
|
|
path.resolve(
|
|
"./tests/fixtures/relative-module-resolver/file2.js",
|
|
),
|
|
);
|
|
});
|
|
});
|
|
});
|