Skip to content

Commit

Permalink
Test fixes for Node 18.
Browse files Browse the repository at this point in the history
  • Loading branch information
kitschpatrol committed Sep 14, 2024
1 parent 03ec4d4 commit d1216ab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion scripts/plugins/esbuild-plugin-iife.extensions.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
declare module '*?iife' {
// eslint-disable-next-line @typescript-eslint/naming-convention
const content: string
export default content
}
1 change: 0 additions & 1 deletion src/lib/utilities/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import chalk from 'chalk'

const isNode = process?.versions?.node !== undefined

// eslint-disable-next-line @typescript-eslint/naming-convention
const log = {
verbose: false,

Expand Down
14 changes: 11 additions & 3 deletions test/tldr-to-image.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,17 @@ describe('save to svg (default behavior)', () => {
tempAssetPath = path.join(os.tmpdir(), `tldraw-cli-test-${Date.now().toString()}`)
await fs.mkdir(tempAssetPath, { recursive: true })

const files = await fs.readdir('./test/assets/valid/', { withFileTypes: true })
for (const { name, parentPath } of files) {
await fs.copyFile(path.join(parentPath, name), `${tempAssetPath}/${name}`)
const sourceDirectory = './test/assets/valid/'
const files = await fs.readdir(sourceDirectory, { withFileTypes: true })
for (const { name } of files) {
// Construct the full path of the source file using sourceDirectory and the file name
const fullSourcePath = path.join(sourceDirectory, name)

// Construct the destination path
const destinationPath = path.join(tempAssetPath, name)

// Copy the file to the destination path
await fs.copyFile(fullSourcePath, destinationPath)
}

const tempFiles = await fs.readdir(tempAssetPath, { withFileTypes: true })
Expand Down

0 comments on commit d1216ab

Please sign in to comment.