import * as React from 'react'; import { TestApp, tests } from '@tensile-perf/react'; import type { TestRenderParams } from '@tensile-perf/react'; export type TestContextValue = { label: string; } const TestContext = React.createContext(undefined); export const useTestContext = () => { return React.useContext(TestContext); } const FluentTestApp: React.FC = ({ children }) => { return ( {children} ); }; const wrappedTests = {}; for (const testName of Object.keys(tests)) { const test = tests[testName]; wrappedTests[testName] = (params: Omit) => { return test({ ...params, TestWrapper: FluentTestApp }); } }; export { wrappedTests as tests }