Files
NapCatQQ/.pnpm-store/v3/files/d5/43ff698ef3e436bd6417f3f919226cce8ce67c2957f3ba779a5b55147cddcaa37335ffbfd8b9d61176e0d2628e807147a736f2ce06db0e558e29f250f1c35c
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

24 lines
627 B
Plaintext

import { createMatchPath } from "../match-path-sync";
import * as Tests from "./data/match-path-data";
describe("match-path-sync", () => {
Tests.tests.forEach((t) =>
it(t.name, () => {
const matchPath = createMatchPath(
t.absoluteBaseUrl,
t.paths,
t.mainFields,
t.addMatchAll
);
const result = matchPath(
t.requestedModule,
(_: string) => t.packageJson,
(name: string) => t.existingFiles.indexOf(name) !== -1,
t.extensions
);
// assert.equal(result, t.expectedPath);
expect(result).toBe(t.expectedPath);
})
);
});