createIssue.test.js 2.9 KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const createIssue_1 = require("./createIssue");
  4. describe(createIssue_1.shouldRecommendIssue, () => {
  5. it("Allows most repos", () => {
  6. const eigen = createIssue_1.shouldRecommendIssue({
  7. org: "artsy",
  8. repo: "eigen",
  9. provider: "GitHub",
  10. });
  11. expect(eigen).toBeTruthy();
  12. const typescript = createIssue_1.shouldRecommendIssue({
  13. org: "Microsoft",
  14. repo: "TypeScript",
  15. provider: "GitHub",
  16. });
  17. expect(typescript).toBeTruthy();
  18. });
  19. it("does not recommend DefinitelyTyped", () => {
  20. const typescript = createIssue_1.shouldRecommendIssue({
  21. org: "DefinitelyTyped",
  22. repo: "DefinitelyTyped",
  23. provider: "GitHub",
  24. });
  25. expect(typescript).toBeFalsy();
  26. });
  27. });
  28. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlSXNzdWUudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVJc3N1ZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0NBQW9EO0FBRXBELFFBQVEsQ0FBQyxrQ0FBb0IsRUFBRSxHQUFHLEVBQUU7SUFDbEMsRUFBRSxDQUFDLG1CQUFtQixFQUFFLEdBQUcsRUFBRTtRQUMzQixNQUFNLEtBQUssR0FBRyxrQ0FBb0IsQ0FBQztZQUNqQyxHQUFHLEVBQUUsT0FBTztZQUNaLElBQUksRUFBRSxPQUFPO1lBQ2IsUUFBUSxFQUFFLFFBQVE7U0FDbkIsQ0FBQyxDQUFBO1FBQ0YsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLFVBQVUsRUFBRSxDQUFBO1FBRTFCLE1BQU0sVUFBVSxHQUFHLGtDQUFvQixDQUFDO1lBQ3RDLEdBQUcsRUFBR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