mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-03 15:05:01 -05:00
chore: update curriculum-helpers to version 3.9.0 (#58525)
This commit is contained in:
@@ -58,23 +58,6 @@ async function initTestFrame(e: InitTestFrameArg = { code: {} }) {
|
||||
return o;
|
||||
};
|
||||
|
||||
const __prepTestComponent = async (
|
||||
component: React.ComponentType | React.FunctionComponent | string,
|
||||
props: Record<string, unknown>
|
||||
) => {
|
||||
const testDiv = document.createElement('div');
|
||||
const createdElement = window.React.createElement(component, props);
|
||||
|
||||
// @ts-expect-error the React version is determined at runtime so we can't define the types here
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/require-await
|
||||
await window.React?.act(async () => {
|
||||
// @ts-expect-error Same for ReactDOM as for React
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
window.ReactDOM?.createRoot(testDiv).render(createdElement);
|
||||
});
|
||||
return testDiv;
|
||||
};
|
||||
|
||||
const { default: chai } = await import(/* webpackChunkName: "chai" */ 'chai');
|
||||
const assert = chai.assert;
|
||||
const __helpers = helpers;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@babel/plugin-transform-runtime": "7.23.7",
|
||||
"@babel/preset-env": "7.23.7",
|
||||
"@babel/preset-typescript": "7.23.3",
|
||||
"@freecodecamp/curriculum-helpers": "3.8.0",
|
||||
"@freecodecamp/curriculum-helpers": "3.9.0",
|
||||
"@types/chai": "4.3.12",
|
||||
"@types/copy-webpack-plugin": "^8.0.1",
|
||||
"@types/enzyme": "3.10.16",
|
||||
|
||||
Reference in New Issue
Block a user