Skip to content

Commit 971e8d2

Browse files
committed
wip
1 parent 28c03af commit 971e8d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/ui/node/reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 })

0 commit comments

Comments
 (0)