match-path-sync.test.js 774 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var match_path_sync_1 = require("../match-path-sync");
  4. var Tests = require("./data/match-path-data");
  5. describe("match-path-sync", function () {
  6. Tests.tests.forEach(function (t) {
  7. return it(t.name, function () {
  8. var matchPath = (0, match_path_sync_1.createMatchPath)(t.absoluteBaseUrl, t.paths, t.mainFields, t.addMatchAll);
  9. var result = matchPath(t.requestedModule, function (_) { return t.packageJson; }, function (name) { return t.existingFiles.indexOf(name) !== -1; }, t.extensions);
  10. // assert.equal(result, t.expectedPath);
  11. expect(result).toBe(t.expectedPath);
  12. });
  13. });
  14. });
  15. //# sourceMappingURL=match-path-sync.test.js.map