ThreeJS with Jest, importing BufferGeometryUtils

Hello, I am trying to run unit tests with jest on an app developed with three js. Since adding BufferGeometryUtils there is a problem with running Jest tests
Any idea what should I do here?

(node:34088) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    node_modules\three\examples\jsm\utils\BufferGeometryUtils.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { BufferAttribute, BufferGeometry, Float32BufferAttribute, InstancedBufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, Vector3 } from 'three';
                                                                                      ^^^^^^

    SyntaxError: Cannot use import statement outside a module

      4 | import * as jsts from 'jsts';
      5 | import * as THREE from 'three';
    > 6 | import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils';
        | ^
      7 | import { bufferMiter, createPolygon, intersection, isPointInPolygon, jstsToGeoJSON, surfaceToShapes, unionLines } from './utils';
      8 |
      9 |

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)
      at Object.<anonymous> (Models/3DModels.tsx:6:1)
      at Object.<anonymous> (ProjectHeader.test.tsx:2:1)

The error arises from Jest’s inability to parse the import statement for BufferGeometryUtils. To resolve this, either configure Jest to support t mobile claim ECMAScript Modules or transform the BufferGeometryUtils.js file using a transpiler like Babel. Refer to Jest’s documentation for detailed configuration options.

Thank You for Your answer. We solved it for know by creating an mock BufferGeometryUtils file, with mock functions inside. But Your solution sounds better in this case