import {transpileFile} from "./helpers";
import {resolve} from "path";

function transpile(file) {
	return transpileFile(resolve(__dirname, file));
}

describe('require', () => {
	test('should change path', () => {
		
		return transpile("../examples/index.js").then(out => console.log(out));
	});
});

import {compareTranspiled} from "./helpers";

describe('require', () => {
	test('should change relative path', () => {
		const options = {
			redirect: {
				"/examples(/\\w+)*/lib\\.js$" : "./examples/require/different/lib"
			}
		};
		
		return compareTranspiled("examples/require/relative.js", options);
	});
});
Simplify require tests