move changesets and avatar components to ui-components

This commit is contained in:
Sebastian Sdorra
2018-12-10 08:45:59 +01:00
parent 8d622f548d
commit 97c4b0998b
18 changed files with 74 additions and 47 deletions

View File

@@ -0,0 +1,22 @@
// @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("");
});
});