How to test components that depend on NODE_ENV with Jest

I got this component I want to test

export const ResponsiveChartContainer = ({ children, height }: Props): React.ReactElement => {
  return process.env.NODE_ENV === 'test' ? (
    children
  ) : (
    <ResponsiveContainer minHeight={height}>{children}</ResponsiveContainer>
  );
};

It relies on NODE_ENV because ResponsiveContainer does not render any children on testing environment.If I put the ResponsiveContainer on the parent container, the graph does not show at all. So removing the ResponsiveContainer from the component is not an option. How can I test it?

I have tried setting NODE_ENV on the test itself but typescript complains it is a read-only variable.