Regenerating node_modules

This commit is contained in:
Chris Raynor 2020-09-14 10:42:37 +01:00
parent 09b4a82c83
commit c96f84308a
No known key found for this signature in database
GPG key ID: 579A1FBC36FDA261
5488 changed files with 487362 additions and 60779 deletions

View file

@ -0,0 +1,23 @@
import { assert } from "chai";
import { createMatchPath } from "../src/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, // fileExists
t.extensions
);
assert.equal(result, t.expectedPath);
})
);
});