hookshot/tests/jira/Utils.ts

19 lines
712 B
TypeScript
Raw Normal View History

2021-11-21 12:34:56 +00:00
import { expect } from "chai";
2021-11-21 16:51:04 +00:00
import { generateJiraWebLinkFromIssue } from "../../src/Jira";
2021-11-21 12:34:56 +00:00
describe("Jira", () => {
describe("Utils", () => {
it("processes a jira issue into a URL", () => {
expect(generateJiraWebLinkFromIssue({
self: "https://my-test-jira/",
key: "TEST-111",
})).to.equal("https://my-test-jira/browse/TEST-111");
});
it("processes a jira issue into a URL with a port", () => {
expect(generateJiraWebLinkFromIssue({
self: "https://my-test-jira:9995/",
key: "TEST-111",
})).to.equal("https://my-test-jira:9995/browse/TEST-111");
});
2021-11-21 12:34:56 +00:00
});
});