Skip to content

Commit

Permalink
Better log output + index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
WcaleNieWolny committed Sep 30, 2023
1 parent 6e10aaa commit 7d4a086
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests_backend/tests/cli/test_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ async function prepareCli(backendBaseUrl: URL, _supabase: SupabaseType) {
await Deno.writeTextFile(capacitorConfigPath, defaultConfig)
await Deno.mkdir(`${tempFileFolder}/dist`)
await Deno.writeTextFile(`${tempFileFolder}/dist/index.js`, indexJsCode)
await Deno.writeTextFile(`${tempFileFolder}/dist/index.html`, '')
await Deno.writeTextFile(`${tempFileFolder}/package.json`, defaultPackageJson)

const pnpmInstallCommand = new Deno.Command('pnpm', {
Expand Down Expand Up @@ -136,13 +137,6 @@ async function runCli(params: string[]): Promise<string> {
stderr: 'piped',
})

// const command = new Deno.Command('ls', {
// args: ['.'],
// cwd: appPath!,
// stdout: 'piped',
// stderr: 'piped',
// })

const subprocess = command.spawn()
const joinedStream = mergeReadableStreams(
subprocess.stdout,
Expand All @@ -162,7 +156,7 @@ async function runCli(params: string[]): Promise<string> {
finalString += string
}

console.log(`final output\n${finalString}}`)
console.log(`final CLI output: \n\n${finalString}}`)
return finalString
}

Expand Down

0 comments on commit 7d4a086

Please sign in to comment.