Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter committed Dec 16, 2024
1 parent 8d355c3 commit 75abbae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/fluentui/projects-test/assets/cra/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';

const root = document.getElementById('root') as HTMLElement;

ReactDOM.render(<App />, root);
5 changes: 5 additions & 0 deletions packages/fluentui/projects-test/src/createReactApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export async function createReactApp() {
await addResolutionPathsForProjectPackages(testAppPathRoot);

await shEcho(`yarn add ${packedPackages['@fluentui/react-northstar']}`, testAppPathRoot);

// Enforce React 17
const dependencies = ['@types/react@17', '@types/react-dom@17', 'react@17', 'react-dom@17'].join(' ');
await shEcho(`yarn add ${dependencies}`, tempPaths.testApp);

logger(`✔️ Fluent UI packages were added to dependencies`);

logger("STEP 3. Reference Fluent UI components in test project's App.tsx");
Expand Down
3 changes: 3 additions & 0 deletions packages/fluentui/react-northstar/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const config = commonConfig({
// Legacy aliases, they should not be used in new tests
...getAliases(),
},
// Keeps Jest from using too much memory as GC gets invokes more often, makes tests slower
// https://stackoverflow.com/a/75857711
workerIdleMemoryLimit: '1024MB',
});
config.setupFilesAfterEnv = [...config.setupFilesAfterEnv, './jest-setup.js'];

Expand Down

0 comments on commit 75abbae

Please sign in to comment.