All non-exported functions are exposed under an exported __test__
object.
// index.js
const privateFunction = () => {
return 'private'
}
export const __test__ = {
privateFunction,
}
// index.test.js
import { __test__ } from './index.js'
const { privateFunction } = __test__
expect(privateFunction()).toBe('private')