dosubot[bot] commented on issue #30297: URL: https://github.com/apache/superset/issues/30297#issuecomment-2354365650
<!-- Answer --> The `shim.tsx` file is located at `superset-frontend/spec/helpers/shim.tsx` <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/spec/helpers/shim.tsx)</sup>. To include this file in your generated plugin, you can modify the Yeoman generator templates. Specifically, you can add the `shim.tsx` file to the list of files created by the generator in the template files. Here are the steps to do this: 1. Navigate to the Yeoman generator directory: ```bash cd superset-frontend/packages/generator-superset ``` 2. Open the generator templates and add the `shim.tsx` file to the list of files to be created. For example, you can add the following line to the generator's template configuration: ```bash create src/shim.tsx ``` 3. Ensure that the `shim.tsx` file is copied to the appropriate location in the generated plugin directory. By doing this, the `shim.tsx` file will be included when the generator runs, and you can then import it in your Jest setup file to mock the `window` object and other necessary globals <sup>[[2]](https://github.com/apache/superset/blob/master/docs/docs/contributing/howtos.mdx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
