@arcadialdev/arcality 3.0.4 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/testRunner.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import 'dotenv/config';
2
2
  import fs from 'node:fs';
3
+ import os from 'node:os';
3
4
  import path from 'node:path';
4
5
  import { spawn } from 'node:child_process';
5
6
  import { select, isCancel, outro, spinner, text } from '@clack/prompts';
@@ -123,7 +124,7 @@ async function runPlaywright(selection: string): Promise<void> {
123
124
 
124
125
  s.stop(chalk.green('✅ Test completed.'));
125
126
 
126
- const reportPath = path.join(process.cwd(), 'tests-report', 'index.html');
127
+ const reportPath = path.join(process.env.REPORTS_DIR || path.join(os.tmpdir(), 'arcality', 'reports'), 'index.html');
127
128
  if (fs.existsSync(reportPath)) {
128
129
  if (isWin) {
129
130
  spawn('cmd', ['/c', 'start', '""', `"${reportPath}"`], {