@@ -41,9 +41,9 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
41
41
42
42
expect ( result ?. success ) . toBe ( true ) ;
43
43
44
- harness . expectFile ( 'dist/extra.file' ) . content . toBe ( 'extra file' ) ;
45
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
46
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
44
+ harness . expectFile ( 'dist/browser/ extra.file' ) . content . toBe ( 'extra file' ) ;
45
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
46
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
47
47
} ) ;
48
48
49
49
describe ( 'shorthand syntax' , ( ) => {
@@ -59,7 +59,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
59
59
60
60
expect ( result ?. success ) . toBe ( true ) ;
61
61
62
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
62
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
63
63
} ) ;
64
64
65
65
it ( 'copies multiple assets' , async ( ) => {
@@ -75,8 +75,8 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
75
75
76
76
expect ( result ?. success ) . toBe ( true ) ;
77
77
78
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
79
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
78
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
79
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
80
80
} ) ;
81
81
82
82
it ( 'copies an asset with directory and maintains directory in output' , async ( ) => {
@@ -91,7 +91,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
91
91
92
92
expect ( result ?. success ) . toBe ( true ) ;
93
93
94
- harness . expectFile ( 'dist/subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
94
+ harness . expectFile ( 'dist/browser/ subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
95
95
} ) ;
96
96
97
97
it ( 'does not fail if asset does not exist' , async ( ) => {
@@ -104,7 +104,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
104
104
105
105
expect ( result ?. success ) . toBe ( true ) ;
106
106
107
- harness . expectFile ( 'dist/test.svg' ) . toNotExist ( ) ;
107
+ harness . expectFile ( 'dist/browser/ test.svg' ) . toNotExist ( ) ;
108
108
} ) ;
109
109
110
110
it ( 'fail if asset path is not within project source root' , async ( ) => {
@@ -119,7 +119,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
119
119
120
120
expect ( error ?. message ) . toMatch ( 'path must start with the project source root' ) ;
121
121
122
- harness . expectFile ( 'dist/test.svg' ) . toNotExist ( ) ;
122
+ harness . expectFile ( 'dist/browser/ test.svg' ) . toNotExist ( ) ;
123
123
} ) ;
124
124
} ) ;
125
125
@@ -136,7 +136,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
136
136
137
137
expect ( result ?. success ) . toBe ( true ) ;
138
138
139
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
139
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
140
140
} ) ;
141
141
142
142
it ( 'copies multiple assets as separate entries' , async ( ) => {
@@ -155,8 +155,8 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
155
155
156
156
expect ( result ?. success ) . toBe ( true ) ;
157
157
158
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
159
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
158
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
159
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
160
160
} ) ;
161
161
162
162
it ( 'copies multiple assets with a single entry glob pattern' , async ( ) => {
@@ -172,8 +172,8 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
172
172
173
173
expect ( result ?. success ) . toBe ( true ) ;
174
174
175
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
176
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
175
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
176
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
177
177
} ) ;
178
178
179
179
it ( 'copies multiple assets with a wildcard glob pattern' , async ( ) => {
@@ -189,8 +189,8 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
189
189
190
190
expect ( result ?. success ) . toBe ( true ) ;
191
191
192
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
193
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
192
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
193
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
194
194
} ) ;
195
195
196
196
it ( 'copies multiple assets with a recursive wildcard glob pattern' , async ( ) => {
@@ -209,9 +209,9 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
209
209
210
210
expect ( result ?. success ) . toBe ( true ) ;
211
211
212
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
213
- harness . expectFile ( 'dist/another.file' ) . content . toBe ( 'asset file' ) ;
214
- harness . expectFile ( 'dist/nested/extra.file' ) . content . toBe ( 'extra file' ) ;
212
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
213
+ harness . expectFile ( 'dist/browser/ another.file' ) . content . toBe ( 'asset file' ) ;
214
+ harness . expectFile ( 'dist/browser/ nested/extra.file' ) . content . toBe ( 'extra file' ) ;
215
215
} ) ;
216
216
217
217
it ( 'automatically ignores "." prefixed files when using wildcard glob pattern' , async ( ) => {
@@ -245,9 +245,9 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
245
245
246
246
expect ( result ?. success ) . toBe ( true ) ;
247
247
248
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
249
- harness . expectFile ( 'dist/another.file' ) . toNotExist ( ) ;
250
- harness . expectFile ( 'dist/nested/extra.file' ) . content . toBe ( 'extra file' ) ;
248
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
249
+ harness . expectFile ( 'dist/browser/ another.file' ) . toNotExist ( ) ;
250
+ harness . expectFile ( 'dist/browser/ nested/extra.file' ) . content . toBe ( 'extra file' ) ;
251
251
} ) ;
252
252
253
253
it ( 'supports ignoring with a glob pattern when using a glob pattern' , async ( ) => {
@@ -266,9 +266,9 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
266
266
267
267
expect ( result ?. success ) . toBe ( true ) ;
268
268
269
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
270
- harness . expectFile ( 'dist/another.file' ) . toNotExist ( ) ;
271
- harness . expectFile ( 'dist/nested/extra.file' ) . toNotExist ( ) ;
269
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
270
+ harness . expectFile ( 'dist/browser/ another.file' ) . toNotExist ( ) ;
271
+ harness . expectFile ( 'dist/browser/ nested/extra.file' ) . toNotExist ( ) ;
272
272
} ) ;
273
273
274
274
it ( 'copies an asset with directory and maintains directory in output' , async ( ) => {
@@ -283,7 +283,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
283
283
284
284
expect ( result ?. success ) . toBe ( true ) ;
285
285
286
- harness . expectFile ( 'dist/subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
286
+ harness . expectFile ( 'dist/browser/ subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
287
287
} ) ;
288
288
289
289
it ( 'does not fail if asset does not exist' , async ( ) => {
@@ -296,7 +296,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
296
296
297
297
expect ( result ?. success ) . toBe ( true ) ;
298
298
299
- harness . expectFile ( 'dist/test.svg' ) . toNotExist ( ) ;
299
+ harness . expectFile ( 'dist/browser/ test.svg' ) . toNotExist ( ) ;
300
300
} ) ;
301
301
302
302
it ( 'uses project output path when output option is empty string' , async ( ) => {
@@ -311,7 +311,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
311
311
312
312
expect ( result ?. success ) . toBe ( true ) ;
313
313
314
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
314
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
315
315
} ) ;
316
316
317
317
it ( 'uses project output path when output option is "."' , async ( ) => {
@@ -326,7 +326,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
326
326
327
327
expect ( result ?. success ) . toBe ( true ) ;
328
328
329
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
329
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
330
330
} ) ;
331
331
332
332
it ( 'uses project output path when output option is "/"' , async ( ) => {
@@ -341,7 +341,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
341
341
342
342
expect ( result ?. success ) . toBe ( true ) ;
343
343
344
- harness . expectFile ( 'dist/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
344
+ harness . expectFile ( 'dist/browser/ test.svg' ) . content . toBe ( '<svg></svg>' ) ;
345
345
} ) ;
346
346
347
347
it ( 'creates a project output sub-path when output option path does not exist' , async ( ) => {
@@ -356,7 +356,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
356
356
357
357
expect ( result ?. success ) . toBe ( true ) ;
358
358
359
- harness . expectFile ( 'dist/subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
359
+ harness . expectFile ( 'dist/browser/ subdirectory/test.svg' ) . content . toBe ( '<svg></svg>' ) ;
360
360
} ) ;
361
361
362
362
it ( 'fails if output option is not within project output path' , async ( ) => {
@@ -373,7 +373,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
373
373
'An asset cannot be written to a location outside of the output path' ,
374
374
) ;
375
375
376
- harness . expectFile ( 'dist/test.svg' ) . toNotExist ( ) ;
376
+ harness . expectFile ( 'dist/browser/ test.svg' ) . toNotExist ( ) ;
377
377
} ) ;
378
378
} ) ;
379
379
} ) ;
0 commit comments