Files
NapCatQQ/.pnpm-store/v3/files/c9/863f1ca4c0ba2f56330d970f8fd8acc25ca0196f5b24911e0350a54e9e466a130237fcc17e95e46e6bf0295244c7f505168eab9b199a59e5440ba8b5669f1d
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
753 B
Plaintext

import { createMatchPathAsync } from "../match-path-async";
import * as Tests from "./data/match-path-data";
describe("match-path-async", () => {
Tests.tests.forEach((t) =>
it(t.name, (done) => {
const matchPath = createMatchPathAsync(
t.absoluteBaseUrl,
t.paths,
t.mainFields,
t.addMatchAll
);
matchPath(
t.requestedModule,
(_path, callback) => callback(undefined, t.packageJson),
(path, callback) =>
callback(undefined, t.existingFiles.indexOf(path) !== -1),
t.extensions,
(_err, result) => {
// assert.equal(result, t.expectedPath);
expect(result).toBe(t.expectedPath);
done();
}
);
})
);
});