mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
test: remove split dependency (#49555)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
@@ -2,7 +2,6 @@ import { app, BrowserWindow, Menu, session, net as electronNet, WebContents, uti
|
||||
|
||||
import { assert, expect } from 'chai';
|
||||
import * as semver from 'semver';
|
||||
import split = require('split')
|
||||
|
||||
import * as cp from 'node:child_process';
|
||||
import { once } from 'node:events';
|
||||
@@ -11,6 +10,7 @@ import * as http from 'node:http';
|
||||
import * as https from 'node:https';
|
||||
import * as net from 'node:net';
|
||||
import * as path from 'node:path';
|
||||
import * as readline from 'node:readline';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
@@ -260,11 +260,11 @@ describe('app module', () => {
|
||||
const firstExited = once(first, 'exit');
|
||||
|
||||
// Wait for the first app to boot.
|
||||
const firstStdoutLines = first.stdout.pipe(split());
|
||||
while ((await once(firstStdoutLines, 'data')).toString() !== 'started') {
|
||||
const firstStdoutLines = readline.createInterface({ input: first.stdout });
|
||||
while ((await once(firstStdoutLines, 'line')).toString() !== 'started') {
|
||||
// wait.
|
||||
}
|
||||
const additionalDataPromise = once(firstStdoutLines, 'data');
|
||||
const additionalDataPromise = once(firstStdoutLines, 'line');
|
||||
|
||||
const secondInstanceArgs = [process.execPath, appPath, ...testArgs.args, '--some-switch', 'some-arg'];
|
||||
const second = cp.spawn(secondInstanceArgs[0], secondInstanceArgs.slice(1));
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/send": "^0.14.5",
|
||||
"@types/sinon": "^9.0.4",
|
||||
"@types/split": "^1.0.5",
|
||||
"@types/uuid": "^3.4.6",
|
||||
"@types/w3c-web-serial": "^1.0.7",
|
||||
"@types/ws": "^7.2.0",
|
||||
@@ -46,7 +45,6 @@
|
||||
"q": "^1.5.1",
|
||||
"send": "^0.19.0",
|
||||
"sinon": "^9.0.1",
|
||||
"split": "^1.0.1",
|
||||
"uuid": "^3.3.3",
|
||||
"winreg": "1.2.4",
|
||||
"ws": "^7.5.10",
|
||||
|
||||
Reference in New Issue
Block a user