|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
627 bytes
|
| Line | |
|---|
| 1 | import { createMatchPath } from "../match-path-sync";
|
|---|
| 2 | import * as Tests from "./data/match-path-data";
|
|---|
| 3 |
|
|---|
| 4 | describe("match-path-sync", () => {
|
|---|
| 5 | Tests.tests.forEach((t) =>
|
|---|
| 6 | it(t.name, () => {
|
|---|
| 7 | const matchPath = createMatchPath(
|
|---|
| 8 | t.absoluteBaseUrl,
|
|---|
| 9 | t.paths,
|
|---|
| 10 | t.mainFields,
|
|---|
| 11 | t.addMatchAll
|
|---|
| 12 | );
|
|---|
| 13 | const result = matchPath(
|
|---|
| 14 | t.requestedModule,
|
|---|
| 15 | (_: string) => t.packageJson,
|
|---|
| 16 | (name: string) => t.existingFiles.indexOf(name) !== -1,
|
|---|
| 17 | t.extensions
|
|---|
| 18 | );
|
|---|
| 19 | // assert.equal(result, t.expectedPath);
|
|---|
| 20 | expect(result).toBe(t.expectedPath);
|
|---|
| 21 | })
|
|---|
| 22 | );
|
|---|
| 23 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.