Files
SCM-Manager/scm-ui/src/repos/components/changesets/changesets.test.js

17 lines
497 B
JavaScript
Raw Normal View History

2018-10-18 14:40:35 +02:00
// @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");
});
});