Use named imports.

This commit is contained in:
Alexander Brown
2026-01-31 13:22:15 -08:00
parent 5b6d1f5bdb
commit c87b863a3b
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
import type { APIRequestContext, Locator, Page } from '@playwright/test'
import { test as base, expect } from '@playwright/test'
import dotenv from 'dotenv'
import * as fs from 'fs'
import { readFileSync } from 'fs'
import type { KeyCombo } from '../../src/platform/keybindings'
import { TestIds } from './selectors'
@@ -550,7 +550,7 @@ export class ComfyPage {
// Dropping a file from the filesystem
if (fileName) {
const filePath = this.assetPath(fileName)
const buffer = fs.readFileSync(filePath)
const buffer = readFileSync(filePath)
const getFileType = (fileName: string) => {
if (fileName.endsWith('.png')) return 'image/png'

View File

@@ -1,4 +1,4 @@
import * as fs from 'fs'
import { readFileSync } from 'fs'
import type { ComfyPage } from '../ComfyPage'
@@ -15,7 +15,7 @@ export class WorkflowHelper {
for (const [key, value] of Object.entries(structure)) {
if (typeof value === 'string') {
const filePath = this.comfyPage.assetPath(value)
result[key] = fs.readFileSync(filePath, 'utf-8')
result[key] = readFileSync(filePath, 'utf-8')
} else {
result[key] = this.convertLeafToContent(value)
}