Skip to content

Commit

Permalink
Another prettier pass for some reason.
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Aug 30, 2023
1 parent c9da1cb commit b382780
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/util/test-rig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class WireitTestRig extends FilesystemTestRig {
this.temp,
'node_modules',
'.bin',
'wireit'
'wireit',
);
if (IS_WINDOWS) {
// Npm install works differently on Windows, since it won't recognize a
Expand Down Expand Up @@ -136,7 +136,7 @@ export class WireitTestRig extends FilesystemTestRig {
*/
exec(
command: string,
opts?: {cwd?: string; env?: Record<string, string | undefined>}
opts?: {cwd?: string; env?: Record<string, string | undefined>},
): ExecResult {
this._assertState('running');
const cwd = this._resolve(opts?.cwd ?? '.');
Expand Down Expand Up @@ -198,13 +198,13 @@ export class WireitTestRig extends FilesystemTestRig {
ipcPath = pathlib.join(
'\\\\?\\pipe',
this.temp,
Math.random().toString()
Math.random().toString(),
);
} else {
ipcPath = pathlib.resolve(
this.temp,
'__sockets',
Math.random().toString()
Math.random().toString(),
);
// The socket file will be created on the net.createServer call, but the
// parent directory must exist.
Expand Down Expand Up @@ -234,7 +234,7 @@ class ExecResult {
constructor(
command: string,
cwd: string,
env: Record<string, string | undefined>
env: Record<string, string | undefined>,
) {
// Remove any environment variables that start with "npm_", because those
// will have been set by the "npm test" or similar command that launched
Expand All @@ -246,7 +246,7 @@ class ExecResult {
const unsetNpmVariables = Object.fromEntries(
Object.keys(process.env)
.filter((name) => /^npm_/i.test(name))
.map((name) => [name, undefined])
.map((name) => [name, undefined]),
);
this._child = spawn(command, {
cwd,
Expand Down Expand Up @@ -366,7 +366,7 @@ class ExecResult {
this._logMatchers.delete(matcher);
stdoutLastIndex = Math.max(
stdoutLastIndex,
stdoutMatch.index + stdoutMatch[0].length
stdoutMatch.index + stdoutMatch[0].length,
);
} else {
const stderrMatch = re.exec(this._matcherStderr);
Expand All @@ -375,7 +375,7 @@ class ExecResult {
this._logMatchers.delete(matcher);
stderrLastIndex = Math.max(
stderrLastIndex,
stderrMatch.index + stderrMatch[0].length
stderrMatch.index + stderrMatch[0].length,
);
}
}
Expand Down

0 comments on commit b382780

Please sign in to comment.