Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jun 19, 2015
1 parent dc6940d commit 5cd2208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion test/function/custom-path-resolver-async/_config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var path = require( 'path' );
var assert = require( 'assert' );

module.exports = {
Expand All @@ -7,8 +8,10 @@ module.exports = {
var Promise = require( 'sander' ).Promise;
var resolved;

if ( importee === path.resolve( __dirname, 'main.js' ) ) return importee;

if ( importee === 'foo' ) {
resolved = require( 'path' ).resolve( __dirname, 'bar.js' );
resolved = path.resolve( __dirname, 'bar.js' );
} else {
resolved = false;
}
Expand Down
6 changes: 3 additions & 3 deletions test/function/custom-path-resolver-sync/_config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
var path = require( 'path' );
var assert = require( 'assert' );

module.exports = {
description: 'uses a custom path resolver (synchronous)',
options: {
resolvePath: function ( importee, importer ) {
if ( importee === 'foo' ) {
return require( 'path' ).resolve( __dirname, 'bar.js' );
}
if ( importee === path.resolve( __dirname, 'main.js' ) ) return importee;
if ( importee === 'foo' ) return path.resolve( __dirname, 'bar.js' );

return false;
}
Expand Down

0 comments on commit 5cd2208

Please sign in to comment.