You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
490 B

10 years ago
var path = require( 'path' );
var assert = require( 'assert' );
module.exports = {
description: 'uses a custom path resolver (synchronous)',
options: {
resolveId: function ( importee, importer ) {
if ( path.normalize(importee) === path.resolve( __dirname, 'main.js' ) ) return importee;
10 years ago
if ( importee === 'foo' ) return path.resolve( __dirname, 'bar.js' );
return false;
}
},
exports: function ( exports ) {
assert.strictEqual( exports.path, require( 'path' ) );
}
};