File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ export default class HTMLReporter implements Reporter {
111111 if ( f === 'index.html' ) {
112112 const html = await fs . readFile ( resolve ( ui , f ) , 'utf-8' )
113113 let metadataCode : string
114- if ( this . options . singleFile ?? true ) {
114+ if ( this . options . singleFile ) {
115115 const base64 = Buffer . from ( data ) . toString ( 'base64' )
116116 metadataCode = `Promise.resolve((${ uint8ArrayFromBase64 . toString ( ) } )("${ base64 } "))`
117117 }
@@ -137,7 +137,7 @@ export default class HTMLReporter implements Reporter {
137137
138138 // copy attachments
139139 // TODO: unify attachmentsDir and html outputFile, so both live together without extra copy
140- if ( existsSync ( this . ctx . config . attachmentsDir ) ) {
140+ if ( ! this . options . singleFile && existsSync ( this . ctx . config . attachmentsDir ) ) {
141141 const destAttachmentsDir = resolve ( this . reporterDir , 'data' )
142142 await fs . rm ( destAttachmentsDir , { recursive : true , force : true } )
143143 await fs . mkdir ( destAttachmentsDir , { recursive : true } )
You can’t perform that action at this time.
0 commit comments