Skip to content

Commit

Permalink
Lint playwright config
Browse files Browse the repository at this point in the history
  • Loading branch information
webfiltered committed Dec 18, 2024
1 parent aae8573 commit 708152b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions playwright.setup.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { type FullConfig } from '@playwright/test';
import { spawn } from 'child_process';
import { spawn } from 'node:child_process';

async function globalSetup(config: FullConfig) {
async function globalSetup() {
console.log('globalSetup');

return new Promise<void>(async (resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const electron = spawn('node', ['./scripts/launchdev.js']);

electron.on('close', () => {
reject('process failed to start');
reject(new Error('process failed to start'));
});

electron.stdout.on('data', (data) => {
if (data.indexOf('App ready') >= 0) {
electron.stdout.on('data', (data: string | Buffer) => {
if (data.includes('App ready')) {
resolve();
}
});
Expand Down

0 comments on commit 708152b

Please sign in to comment.