mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
23 lines
672 B
JavaScript
23 lines
672 B
JavaScript
// @flow
|
|
|
|
import {parseDescription} from "./changesets";
|
|
|
|
describe("parseDescription tests", () => {
|
|
it("should return a description with title and message", () => {
|
|
const desc = parseDescription("Hello\nTrillian");
|
|
expect(desc.title).toBe("Hello");
|
|
expect(desc.message).toBe("Trillian");
|
|
});
|
|
|
|
it("should return a description with title and without message", () => {
|
|
const desc = parseDescription("Hello Trillian");
|
|
expect(desc.title).toBe("Hello Trillian");
|
|
});
|
|
|
|
it("should return an empty description for undefined", () => {
|
|
const desc = parseDescription();
|
|
expect(desc.title).toBe("");
|
|
expect(desc.message).toBe("");
|
|
});
|
|
});
|