function prepareModuleInitializerArgs(
  requireRelativeWithContext,
  moduleObj,
  moduleData
) {
  /** @type {NodeJS.Require} */
  const require = /** @type {any} */ (requireRelativeWithContext)
  const module = moduleObj
  const exports = moduleObj.exports
  const __filename = moduleData.file
  const __dirname = path.dirname(__filename)
  require.resolve = /** @type {any} */ (
    () => {
      throw new Error(
        'require.resolve not implemented in lavamoat-core test harness'
      )
    }
  )
  return [exports, require, module, __filename, __dirname]
}
@param {((id: string) => unknown) & { resolve: (id: string) => string }} requireRelativeWithContext
@param {any} moduleObj
@param {any} moduleData
@returns