@@ -8,132 +8,132 @@ const webpack = require('../index');
8
8
9
9
const file = path . join ( __dirname , 'files' , 'dummy.js' ) ;
10
10
11
- describe ( " resolve.alias" , function ( ) {
11
+ describe ( ' resolve.alias' , function ( ) {
12
12
let resolved ;
13
13
before ( function ( ) { resolved = webpack . resolve ( 'foo' , file ) ; } ) ;
14
14
15
- it ( " is found" , function ( ) { expect ( resolved ) . to . have . property ( 'found' , true ) ; } ) ;
15
+ it ( ' is found' , function ( ) { expect ( resolved ) . to . have . property ( 'found' , true ) ; } ) ;
16
16
17
- it ( " is correct" , function ( ) {
17
+ it ( ' is correct' , function ( ) {
18
18
expect ( resolved ) . to . have . property ( 'path' )
19
19
. and . equal ( path . join ( __dirname , 'files' , 'some' , 'goofy' , 'path' , 'foo.js' ) ) ;
20
20
} ) ;
21
21
} ) ;
22
22
23
23
// todo: reimplement with resolver function / config
24
- // describe.skip(" webpack alias spec" , function () {
24
+ // describe.skip(' webpack alias spec' , function () {
25
25
// // from table: http://webpack.github.io/docs/configuration.html#resolve-alias
26
26
// function tableLine(alias, xyz, xyzFile) {
27
27
// describe(JSON.stringify(alias), function () {
28
- // it(" xyz: " + xyz, function () {
29
- // expect(resolveAlias('xyz', alias)).to.equal(xyz)
30
- // })
31
- // it(" xyz/file: " + (xyzFile.name || xyzFile), function () {
28
+ // it(' xyz: ' + xyz, function () {
29
+ // expect(resolveAlias('xyz', alias)).to.equal(xyz);
30
+ // });
31
+ // it(' xyz/file: ' + (xyzFile.name || xyzFile), function () {
32
32
// if (xyzFile === Error) {
33
- // expect(resolveAlias.bind(null, 'xyz/file', alias)).to.throw(xyzFile)
33
+ // expect(resolveAlias.bind(null, 'xyz/file', alias)).to.throw(xyzFile);
34
34
// } else {
35
- // expect(resolveAlias('xyz/file', alias)).to.equal(xyzFile)
35
+ // expect(resolveAlias('xyz/file', alias)).to.equal(xyzFile);
36
36
// }
37
- // })
38
- // })
37
+ // });
38
+ // });
39
39
// }
40
40
41
41
// tableLine( {}
42
- // , 'xyz', 'xyz/file' )
42
+ // , 'xyz', 'xyz/file' );
43
43
44
- // tableLine( { xyz: " /absolute/path/to/file.js" }
45
- // , '/absolute/path/to/file.js', 'xyz/file' )
44
+ // tableLine( { xyz: ' /absolute/path/to/file.js' }
45
+ // , '/absolute/path/to/file.js', 'xyz/file' );
46
46
47
- // tableLine( { xyz$: " /absolute/path/to/file.js" }
48
- // , " /absolute/path/to/file.js" , Error )
47
+ // tableLine( { xyz$: ' /absolute/path/to/file.js' }
48
+ // , ' /absolute/path/to/file.js' , Error );
49
49
50
- // tableLine( { xyz: " ./dir/file.js" }
51
- // , './dir/file.js', 'xyz/file' )
50
+ // tableLine( { xyz: ' ./dir/file.js' }
51
+ // , './dir/file.js', 'xyz/file' );
52
52
53
- // tableLine( { xyz$: " ./dir/file.js" }
54
- // , './dir/file.js', Error )
53
+ // tableLine( { xyz$: ' ./dir/file.js' }
54
+ // , './dir/file.js', Error );
55
55
56
- // tableLine( { xyz: " /some/dir" }
57
- // , '/some/dir', '/some/dir/file' )
56
+ // tableLine( { xyz: ' /some/dir' }
57
+ // , '/some/dir', '/some/dir/file' );
58
58
59
- // tableLine( { xyz$: " /some/dir" }
60
- // , '/some/dir', 'xyz/file' )
59
+ // tableLine( { xyz$: ' /some/dir' }
60
+ // , '/some/dir', 'xyz/file' );
61
61
62
- // tableLine( { xyz: " ./dir" }
63
- // , './dir', './dir/file' )
62
+ // tableLine( { xyz: ' ./dir' }
63
+ // , './dir', './dir/file' );
64
64
65
- // tableLine( { xyz: " modu" }
66
- // , 'modu', 'modu/file' )
65
+ // tableLine( { xyz: ' modu' }
66
+ // , 'modu', 'modu/file' );
67
67
68
- // tableLine( { xyz$: " modu" }
69
- // , 'modu', 'xyz/file' )
68
+ // tableLine( { xyz$: ' modu' }
69
+ // , 'modu', 'xyz/file' );
70
70
71
- // tableLine( { xyz: " modu/some/file.js" }
72
- // , 'modu/some/file.js', Error )
71
+ // tableLine( { xyz: ' modu/some/file.js' }
72
+ // , 'modu/some/file.js', Error );
73
73
74
- // tableLine( { xyz: " modu/dir" }
75
- // , 'modu/dir', 'modu/dir/file' )
74
+ // tableLine( { xyz: ' modu/dir' }
75
+ // , 'modu/dir', 'modu/dir/file' );
76
76
77
- // tableLine( { xyz: " xyz/dir" }
78
- // , 'xyz/dir', 'xyz/dir/file' )
77
+ // tableLine( { xyz: ' xyz/dir' }
78
+ // , 'xyz/dir', 'xyz/dir/file' );
79
79
80
- // tableLine( { xyz$: " xyz/dir" }
81
- // , 'xyz/dir', 'xyz/file' )
82
- // })
80
+ // tableLine( { xyz$: ' xyz/dir' }
81
+ // , 'xyz/dir', 'xyz/file' );
82
+ // });
83
83
84
- // describe.skip(" nested module names" , function () {
84
+ // describe.skip(' nested module names' , function () {
85
85
// // from table: http://webpack.github.io/docs/configuration.html#resolve-alias
86
86
// function nestedName(alias, xyz, xyzFile) {
87
87
// describe(JSON.stringify(alias), function () {
88
- // it(" top/xyz: " + xyz, function () {
89
- // expect(resolveAlias('top/xyz', alias)).to.equal(xyz)
90
- // })
91
- // it(" top/xyz/file: " + (xyzFile.name || xyzFile), function () {
88
+ // it(' top/xyz: ' + xyz, function () {
89
+ // expect(resolveAlias('top/xyz', alias)).to.equal(xyz);
90
+ // });
91
+ // it(' top/xyz/file: ' + (xyzFile.name || xyzFile), function () {
92
92
// if (xyzFile === Error) {
93
- // expect(resolveAlias.bind(null, 'top/xyz/file', alias)).to.throw(xyzFile)
93
+ // expect(resolveAlias.bind(null, 'top/xyz/file', alias)).to.throw(xyzFile);
94
94
// } else {
95
- // expect(resolveAlias('top/xyz/file', alias)).to.equal(xyzFile)
95
+ // expect(resolveAlias('top/xyz/file', alias)).to.equal(xyzFile);
96
96
// }
97
- // })
98
- // })
97
+ // });
98
+ // });
99
99
// }
100
100
101
- // nestedName( { 'top/xyz': " /absolute/path/to/file.js" }
102
- // , '/absolute/path/to/file.js', 'top/xyz/file' )
101
+ // nestedName( { 'top/xyz': ' /absolute/path/to/file.js' }
102
+ // , '/absolute/path/to/file.js', 'top/xyz/file' );
103
103
104
- // nestedName( { 'top/xyz$': " /absolute/path/to/file.js" }
105
- // , " /absolute/path/to/file.js" , Error )
104
+ // nestedName( { 'top/xyz$': ' /absolute/path/to/file.js' }
105
+ // , ' /absolute/path/to/file.js' , Error );
106
106
107
- // nestedName( { 'top/xyz': " ./dir/file.js" }
108
- // , './dir/file.js', 'top/xyz/file' )
107
+ // nestedName( { 'top/xyz': ' ./dir/file.js' }
108
+ // , './dir/file.js', 'top/xyz/file' );
109
109
110
- // nestedName( { 'top/xyz$': " ./dir/file.js" }
111
- // , './dir/file.js', Error )
110
+ // nestedName( { 'top/xyz$': ' ./dir/file.js' }
111
+ // , './dir/file.js', Error );
112
112
113
- // nestedName( { 'top/xyz': " /some/dir" }
114
- // , '/some/dir', '/some/dir/file' )
113
+ // nestedName( { 'top/xyz': ' /some/dir' }
114
+ // , '/some/dir', '/some/dir/file' );
115
115
116
- // nestedName( { 'top/xyz$': " /some/dir" }
117
- // , '/some/dir', 'top/xyz/file' )
116
+ // nestedName( { 'top/xyz$': ' /some/dir' }
117
+ // , '/some/dir', 'top/xyz/file' );
118
118
119
- // nestedName( { 'top/xyz': " ./dir" }
120
- // , './dir', './dir/file' )
119
+ // nestedName( { 'top/xyz': ' ./dir' }
120
+ // , './dir', './dir/file' );
121
121
122
- // nestedName( { 'top/xyz': " modu" }
123
- // , 'modu', 'modu/file' )
122
+ // nestedName( { 'top/xyz': ' modu' }
123
+ // , 'modu', 'modu/file' );
124
124
125
- // nestedName( { 'top/xyz$': " modu" }
126
- // , 'modu', 'top/xyz/file' )
125
+ // nestedName( { 'top/xyz$': ' modu' }
126
+ // , 'modu', 'top/xyz/file' );
127
127
128
- // nestedName( { 'top/xyz': " modu/some/file.js" }
129
- // , 'modu/some/file.js', Error )
128
+ // nestedName( { 'top/xyz': ' modu/some/file.js' }
129
+ // , 'modu/some/file.js', Error );
130
130
131
- // nestedName( { 'top/xyz': " modu/dir" }
132
- // , 'modu/dir', 'modu/dir/file' )
131
+ // nestedName( { 'top/xyz': ' modu/dir' }
132
+ // , 'modu/dir', 'modu/dir/file' );
133
133
134
- // nestedName( { 'top/xyz': " top/xyz/dir" }
135
- // , 'top/xyz/dir', 'top/xyz/dir/file' )
134
+ // nestedName( { 'top/xyz': ' top/xyz/dir' }
135
+ // , 'top/xyz/dir', 'top/xyz/dir/file' );
136
136
137
- // nestedName( { 'top/xyz$': " top/xyz/dir" }
138
- // , 'top/xyz/dir', 'top/xyz/file' )
139
- // })
137
+ // nestedName( { 'top/xyz$': ' top/xyz/dir' }
138
+ // , 'top/xyz/dir', 'top/xyz/file' );
139
+ // });
0 commit comments