mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
apply eslint and prettier rules
This commit is contained in:
@@ -50,9 +50,7 @@ describe("ExtensionPoint test", () => {
|
||||
mockedBinder.hasExtension.mockReturnValue(true);
|
||||
mockedBinder.getExtensions.mockReturnValue([labelOne, labelTwo]);
|
||||
|
||||
const rendered = mount(
|
||||
<ExtensionPointEnzymeFix name="something.special" renderAll={true} />
|
||||
);
|
||||
const rendered = mount(<ExtensionPointEnzymeFix name="something.special" renderAll={true} />);
|
||||
const text = rendered.text();
|
||||
expect(text).toContain("Extension One");
|
||||
expect(text).toContain("Extension Two");
|
||||
@@ -123,11 +121,7 @@ describe("ExtensionPoint test", () => {
|
||||
};
|
||||
|
||||
const HelloUser = () => {
|
||||
return (
|
||||
<UserContext.Consumer>
|
||||
{({ name }) => <Hello name={name} />}
|
||||
</UserContext.Consumer>
|
||||
);
|
||||
return <UserContext.Consumer>{({ name }) => <Hello name={name} />}</UserContext.Consumer>;
|
||||
};
|
||||
|
||||
mockedBinder.hasExtension.mockReturnValue(true);
|
||||
|
||||
@@ -41,25 +41,13 @@ describe("binder tests", () => {
|
||||
});
|
||||
|
||||
type Props = {
|
||||
category: string
|
||||
category: string;
|
||||
};
|
||||
|
||||
it("should return only extensions which predicates matches", () => {
|
||||
binder.bind(
|
||||
"hitchhicker.trillian",
|
||||
"heartOfGold",
|
||||
(props: Props) => props.category === "a"
|
||||
);
|
||||
binder.bind(
|
||||
"hitchhicker.trillian",
|
||||
"earth",
|
||||
(props: Props) => props.category === "b"
|
||||
);
|
||||
binder.bind(
|
||||
"hitchhicker.trillian",
|
||||
"earth2",
|
||||
(props: Props) => props.category === "a"
|
||||
);
|
||||
binder.bind("hitchhicker.trillian", "heartOfGold", (props: Props) => props.category === "a");
|
||||
binder.bind("hitchhicker.trillian", "earth", (props: Props) => props.category === "b");
|
||||
binder.bind("hitchhicker.trillian", "earth2", (props: Props) => props.category === "a");
|
||||
|
||||
const extensions = binder.getExtensions("hitchhicker.trillian", {
|
||||
category: "b"
|
||||
|
||||
@@ -31,7 +31,7 @@ export class Binder {
|
||||
}
|
||||
const registration = {
|
||||
predicate: predicate ? predicate : () => true,
|
||||
extension,
|
||||
extension
|
||||
};
|
||||
this.extensionPoints[extensionPoint].push(registration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user