initial commit of actions

This commit is contained in:
Dominik Polakovics Polakovics 2026-01-31 18:56:04 +01:00
commit 949ece5785
44660 changed files with 12034344 additions and 0 deletions

View file

@ -0,0 +1,27 @@
import { assert } from "chai";
import { createMatchPathAsync } from "../src/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);
done();
}
);
})
);
});