Unit Testing with Jest

I am trying to unit test with Jest.

This code works:

import {create} from "ipfs";
test("dummy",async () => {
    expect(1).toBe(1)
})

This code does not work:

import {create} from "ipfs";
test("dummy",async () => {
    await create();
    expect(1).toBe(1)
})

Jest prints this to the console multiple times:

ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From index.test.js.

          at async Promise.all (index 6)
          at async Promise.all (index 8)
          at async Promise.all (index 1)
          at async Promise.all (index 1)
          at async Promise.all (index 3)
          at async Promise.all (index 10)
          at async Promise.all (index 40)

The final printout is this:

Test suite failed to run
                                                                                                                                                                                                                                                                                                            
    ENOENT: no such file or directory, open 'constants'

      at Runtime.readFileBuffer (node_modules/jest-runtime/build/index.js:2147:21)
          at Array.forEach (<anonymous>)
          at async Promise.all (index 0)
          at async Promise.all (index 1)
          at async Promise.all (index 5)
          at async Promise.all (index 3)
          at async Promise.all (index 28)
          at async Promise.all (index 0)
          at async Promise.all (index 0)
          at async Promise.all (index 1)

I have plenty of app code that works, just trying to start adding unit tests, but this is obviously a blocker! Any help appreciated. I could not find a solution elsewhere on the forums.