async function loadFixture(name, env) {
	const fixture = path.join(__dirname, 'fixtures', name);

	// Ensure fixture name is included for parent alias tests
	env.tmp.path = path.join(env.tmp.path, path.basename(name));
	await fs.mkdir(env.tmp.path, { recursive: true });

	await ncp(fixture, env.tmp.path);

	// Delete copied .cache folder in case tests are run locally
	const cacheDir = path.join(env.tmp.path, '.cache');
	if (await isDirectory(cacheDir)) {
		await fs.rmdir(cacheDir, { recursive: true });
	}

	try {
		await fs.mkdir(path.join(env.tmp.path, 'node_modules', 'wmr'), { recursive: true });
		await fs.mkdir(path.join(env.tmp.path, 'node_modules', '@wmrjs', 'directory-import', 'src'), { recursive: true });
	} catch (err) {
		if (!/EEXIST/.test(err.message)) {
			throw err;
		}
	}

	// Copy fake wmr node_modules over
	await fs.copyFile(path.join(__dirname, '..', 'index.js'), path.join(env.tmp.path, 'node_modules', 'wmr', 'index.js'));
	await fs.copyFile(
		path.join(__dirname, '..', 'package.json'),
		path.join(env.tmp.path, 'node_modules', 'wmr', 'package.json')
	);

	await fs.copyFile(
		path.join(__dirname, '..', '..', 'directory-plugin', 'src', 'index.js'),
		path.join(env.tmp.path, 'node_modules', '@wmrjs', 'directory-import', 'src', 'index.js')
	);
	await fs.copyFile(
		path.join(__dirname, '..', '..', 'directory-plugin', 'package.json'),
		path.join(env.tmp.path, 'node_modules', '@wmrjs', 'directory-import', 'package.json')
	);

	// If there is a `-node_modules` directory, copy that over too
	const fakeDir = path.join(fixture, '-node_modules');
	if (await isDirectory(fakeDir)) {
		const dirs = await fs.readdir(fakeDir);
		for (const dir of dirs) {
			await ncp(path.join(fakeDir, dir), path.join(env.tmp.path, 'node_modules', dir));
		}
	}
}
@param {string} name
@param {TestEnv} env