@@ -25,14 +25,14 @@ const preferRelativeResolve = resolve.create({
25
25
} ) ;
26
26
27
27
function testResolve ( name , context , moduleName , result ) {
28
- describe ( name , function ( ) {
29
- it ( "should resolve sync correctly" , function ( ) {
28
+ describe ( name , function ( ) {
29
+ it ( "should resolve sync correctly" , function ( ) {
30
30
var filename = resolve . sync ( context , moduleName ) ;
31
31
should . exist ( filename ) ;
32
32
filename . should . equal ( result ) ;
33
33
} ) ;
34
- it ( "should resolve async correctly" , function ( done ) {
35
- resolve ( context , moduleName , function ( err , filename ) {
34
+ it ( "should resolve async correctly" , function ( done ) {
35
+ resolve ( context , moduleName , function ( err , filename ) {
36
36
if ( err ) return done ( err ) ;
37
37
should . exist ( filename ) ;
38
38
filename . should . equal ( result ) ;
@@ -43,23 +43,23 @@ function testResolve(name, context, moduleName, result) {
43
43
}
44
44
45
45
function testResolveContext ( name , context , moduleName , result ) {
46
- describe ( name , function ( ) {
47
- it ( "should resolve async correctly" , function ( done ) {
48
- asyncContextResolve ( context , moduleName , function ( err , filename ) {
46
+ describe ( name , function ( ) {
47
+ it ( "should resolve async correctly" , function ( done ) {
48
+ asyncContextResolve ( context , moduleName , function ( err , filename ) {
49
49
if ( err ) done ( err ) ;
50
50
should . exist ( filename ) ;
51
51
filename . should . equal ( result ) ;
52
52
done ( ) ;
53
53
} ) ;
54
54
} ) ;
55
- it ( "should resolve sync correctly" , function ( ) {
55
+ it ( "should resolve sync correctly" , function ( ) {
56
56
var filename = syncContextResolve ( context , moduleName ) ;
57
57
should . exist ( filename ) ;
58
58
filename . should . equal ( result ) ;
59
59
} ) ;
60
60
} ) ;
61
61
}
62
- describe ( "resolve" , function ( ) {
62
+ describe ( "resolve" , function ( ) {
63
63
testResolve (
64
64
"absolute path" ,
65
65
fixtures ,
@@ -239,13 +239,13 @@ describe("resolve", function() {
239
239
path . join ( fixtures , "main-field-self2" , "index.js" )
240
240
) ;
241
241
242
- it ( "should correctly resolve" , function ( done ) {
242
+ it ( "should correctly resolve" , function ( done ) {
243
243
const issue238 = path . resolve ( fixtures , "issue-238" ) ;
244
244
245
245
issue238Resolve (
246
246
path . resolve ( issue238 , "./src/common" ) ,
247
247
"config/myObjectFile" ,
248
- function ( err , filename ) {
248
+ function ( err , filename ) {
249
249
if ( err ) done ( err ) ;
250
250
should . exist ( filename ) ;
251
251
filename . should . equal (
@@ -256,17 +256,17 @@ describe("resolve", function() {
256
256
) ;
257
257
} ) ;
258
258
259
- it ( "should correctly resolve with preferRelative" , function ( done ) {
260
- preferRelativeResolve ( fixtures , "main1.js" , function ( err , filename ) {
259
+ it ( "should correctly resolve with preferRelative" , function ( done ) {
260
+ preferRelativeResolve ( fixtures , "main1.js" , function ( err , filename ) {
261
261
if ( err ) done ( err ) ;
262
262
should . exist ( filename ) ;
263
263
filename . should . equal ( path . join ( fixtures , "main1.js" ) ) ;
264
264
done ( ) ;
265
265
} ) ;
266
266
} ) ;
267
267
268
- it ( "should correctly resolve with preferRelative" , function ( done ) {
269
- preferRelativeResolve ( fixtures , "m1/a.js" , function ( err , filename ) {
268
+ it ( "should correctly resolve with preferRelative" , function ( done ) {
269
+ preferRelativeResolve ( fixtures , "m1/a.js" , function ( err , filename ) {
270
270
if ( err ) done ( err ) ;
271
271
should . exist ( filename ) ;
272
272
filename . should . equal ( path . join ( fixtures , "node_modules" , "m1" , "a.js" ) ) ;
0 commit comments