Small improvements

This commit is contained in:
Andras Schmelczer 2026-09-19 15:23:24 +01:00
commit 5624e51f52
4 changed files with 82 additions and 225 deletions

View file

@ -42,7 +42,7 @@ function testUsesPauseServer(test: TestDefinition): boolean {
*/
function findProjectRoot(): string {
let dir = path.dirname(__filename);
const root = path.parse(dir).root;
const {root} = path.parse(dir);
while (dir !== root) {
if (
fs.existsSync(path.join(dir, "sync-server")) &&

View file

@ -304,7 +304,7 @@ export class DeterministicAgent extends debugging.InMemoryFileSystem {
});
}
const nextWriteRename = this.nextWriteRename;
const { nextWriteRename } = this;
if (
nextWriteRename !== undefined &&
nextWriteRename.oldPath === path

View file

@ -239,8 +239,7 @@ export class ServerControl {
public isRunning(): boolean {
const proc = this.process;
return (
proc !== null &&
proc.pid !== undefined &&
proc?.pid !== undefined &&
proc.exitCode === null &&
proc.signalCode === null
);

View file

@ -190,7 +190,7 @@ export class TestRunner {
(entry) =>
entry.details.type === step.syncType &&
entry.details.relativePath === step.path,
() => this.serverControl.pause()
() => { this.serverControl.pause(); }
);
this.serverControl.resume();
await historySeen;