@@ -90,39 +90,39 @@ describe('correct-filename', () => {
90
90
describe ( 'publicPath option' , ( ) => {
91
91
it ( 'should be supported' , ( ) => {
92
92
expect ( run ( '/file.txt' , 'publicPath=http://cdn/' ) . result ) . toEqual (
93
- 'export default "http://cdn/81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
93
+ 'module.exports = "http://cdn/81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
94
94
) ;
95
95
} ) ;
96
96
97
97
it ( 'should override public path when given empty string' , ( ) => {
98
98
expect ( run ( '/file.txt' , 'publicPath=' ) . result ) . toEqual (
99
- 'export default "81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
99
+ 'module.exports = "81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
100
100
) ;
101
101
} ) ;
102
102
103
103
it ( 'should use webpack public path when not set' , ( ) => {
104
104
expect ( run ( '/file.txt' ) . result ) . toEqual (
105
- 'export default __webpack_public_path__ + "81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
105
+ 'module.exports = __webpack_public_path__ + "81dc9bdb52d04dc20036dbd8313ed055.txt";' ,
106
106
) ;
107
107
} ) ;
108
108
} ) ;
109
109
110
110
describe ( 'useRelativePath option' , ( ) => {
111
111
it ( 'should be supported' , ( ) => {
112
112
expect ( run ( '/this/is/the/context/file.txt' , 'useRelativePath=true' ) . result ) . toEqual (
113
- 'export default __webpack_public_path__ + \"./81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
113
+ 'module.exports = __webpack_public_path__ + \"./81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
114
114
) ;
115
115
116
116
expect ( run ( '/this/is/file.txt' , 'useRelativePath=true' ) . result ) . toEqual (
117
- 'export default __webpack_public_path__ + \"../../81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
117
+ 'module.exports = __webpack_public_path__ + \"../../81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
118
118
) ;
119
119
120
120
expect ( run ( '/this/file.txt' , 'context=/this/is/the/&useRelativePath=true' ) . result ) . toEqual (
121
- 'export default __webpack_public_path__ + \"../../81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
121
+ 'module.exports = __webpack_public_path__ + \"../../81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
122
122
) ;
123
123
124
124
expect ( run ( '/this/file.txt' , 'context=/&useRelativePath=true' ) . result ) . toEqual (
125
- 'export default __webpack_public_path__ + \"this/81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
125
+ 'module.exports = __webpack_public_path__ + \"this/81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
126
126
) ;
127
127
} ) ;
128
128
} ) ;
@@ -134,7 +134,7 @@ describe('outputPath function', () => {
134
134
135
135
expect ( runWithOptions ( '/this/is/the/context/file.txt' , options ) . result )
136
136
. toEqual (
137
- 'export default __webpack_public_path__ + \"/path/set/by/func\";' ,
137
+ 'module.exports = __webpack_public_path__ + \"/path/set/by/func\";' ,
138
138
) ;
139
139
} ) ;
140
140
@@ -145,7 +145,7 @@ describe('outputPath function', () => {
145
145
146
146
expect ( runWithOptions ( '/this/is/the/context/file.txt' , options ) . result )
147
147
. toEqual (
148
- 'export default __webpack_public_path__ + \"./81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
148
+ 'module.exports = __webpack_public_path__ + \"./81dc9bdb52d04dc20036dbd8313ed055.txt\";' ,
149
149
) ;
150
150
} ) ;
151
151
} ) ;
0 commit comments