Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) O3-1422 / O3-2724: Move workspace system into the framework #979

Merged
merged 19 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react-hooks"],
"ignorePatterns": ["**/*.test.tsx"],
"rules": {
"react-hooks/rules-of-hooks": "error",
// Disabling these rules for now just to keep the diff small. I'll enable them in a future PR that fixes lint issues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { render, waitFor } from '@testing-library/react';
import RedirectLogout from './redirect-logout.component';
import {
Session,
type Session,
clearCurrentUser,
navigate,
openmrsFetch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ declare module '*.scss';
declare module '@carbon/react';
declare type HeaderPanelProps = {};
declare type SideNavProps = {
isChildOfHeader: boolean;
isChildOfHeader?: boolean;
};
16 changes: 16 additions & 0 deletions packages/framework/esm-extensions/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ export const getExtensionInternalStore = () =>
slots: {},
extensions: {},
});

const mockExtensionRegistry = {};

export const getExtensionRegistration = jest.fn((name) => {
return mockExtensionRegistry[name];
});

export const registerExtension = jest.fn((ext) => {
mockExtensionRegistry[ext.name] = ext;
});

export function clearMockExtensionRegistry() {
Object.keys(mockExtensionRegistry).forEach((key) => {
delete mockExtensionRegistry[key];
});
}
Loading
Loading