Skip to content

Commit

Permalink
(feat) O3-1422 / O3-2724: Move workspace system into the framework (o…
Browse files Browse the repository at this point in the history
…penmrs#979)

Co-authored-by: Vineet Sharma <[email protected]>
  • Loading branch information
brandones and vasharma05 authored Apr 20, 2024
1 parent f4b1cc3 commit eeb48a4
Show file tree
Hide file tree
Showing 53 changed files with 3,309 additions and 195 deletions.
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

0 comments on commit eeb48a4

Please sign in to comment.