Skip to content

Commit 86b7a13

Browse files
committed
Apply Prettier formatting to new preflight test scenarios
1 parent ab17006 commit 86b7a13

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

test/preflight.spec.ts

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,26 @@ await scenario('acquireLock: acquires, then re-acquires after release', async ()
111111
});
112112
});
113113

114-
await scenario(
115-
'acquireLock: surfaces ELOCKED as instance-running with rm -rf hint',
116-
async () => {
117-
await withTempStorage(async (storageRoot) => {
118-
const lockPath = join(storageRoot, '.lock');
119-
const release = await acquireLock(storageRoot, lockPath);
120-
try {
121-
const err = await expectPreflightError(
122-
async () => {
123-
await acquireLock(storageRoot, lockPath);
124-
},
125-
'instance-running',
126-
'rm -rf',
127-
);
128-
if (!err.hint || !err.hint.includes(`${lockPath}.meta.json`)) {
129-
throw new Error(`expected hint to mention meta sidecar, got: ${err.hint}`);
130-
}
131-
} finally {
132-
await release();
114+
await scenario('acquireLock: surfaces ELOCKED as instance-running with rm -rf hint', async () => {
115+
await withTempStorage(async (storageRoot) => {
116+
const lockPath = join(storageRoot, '.lock');
117+
const release = await acquireLock(storageRoot, lockPath);
118+
try {
119+
const err = await expectPreflightError(
120+
async () => {
121+
await acquireLock(storageRoot, lockPath);
122+
},
123+
'instance-running',
124+
'rm -rf',
125+
);
126+
if (!err.hint || !err.hint.includes(`${lockPath}.meta.json`)) {
127+
throw new Error(`expected hint to mention meta sidecar, got: ${err.hint}`);
133128
}
134-
});
135-
},
136-
);
129+
} finally {
130+
await release();
131+
}
132+
});
133+
});
137134

138135
await scenario('acquireLock: legacy `.lock` file is migrated away', async () => {
139136
await withTempStorage(async (storageRoot) => {

0 commit comments

Comments
 (0)