Files
SCM-Manager/scm-plugins/scm-git-plugin/src/main/js/index.test.js
2019-10-09 11:22:16 +02:00

16 lines
457 B
JavaScript

// @flow
import { gitPredicate } from "./index";
describe("test git predicate", () => {
it("should return false", () => {
expect(gitPredicate()).toBe(false);
expect(gitPredicate({})).toBe(false);
expect(gitPredicate({ repository: {} })).toBe(false);
expect(gitPredicate({ repository: { type: "hg" } })).toBe(false);
});
it("should return true", () => {
expect(gitPredicate({ repository: { type: "git" } })).toBe(true);
});
});