Skip to content

Commit 9d78c6d

Browse files
committed
fix: resolve lint and formatting issues
1 parent b5b75e1 commit 9d78c6d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scripts/bin-test/test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async function runHttpDiscovery(modulePath: string): Promise<DiscoveryResult> {
189189

190190
async function runFileDiscovery(modulePath: string): Promise<DiscoveryResult> {
191191
const outputPath = path.join(os.tmpdir(), `firebase-functions-test-${Date.now()}.json`);
192-
192+
193193
return new Promise((resolve, reject) => {
194194
const proc = subprocess.spawn("npx", ["firebase-functions"], {
195195
cwd: path.resolve(modulePath),
@@ -213,19 +213,21 @@ async function runFileDiscovery(modulePath: string): Promise<DiscoveryResult> {
213213

214214
proc.on("close", async (code) => {
215215
clearTimeout(timeoutId);
216-
216+
217217
if (code === 0) {
218218
try {
219219
const manifestJson = await fs.readFile(outputPath, "utf8");
220220
const manifest = JSON.parse(manifestJson) as Record<string, unknown>;
221-
await fs.unlink(outputPath).catch(() => {});
221+
await fs.unlink(outputPath).catch(() => {
222+
// Ignore errors
223+
});
222224
resolve({ success: true, manifest });
223225
} catch (e) {
224226
resolve({ success: false, error: `Failed to read manifest file: ${e}` });
225227
}
226228
} else {
227-
const errorLines = stderr.split('\n').filter(line => line.trim());
228-
const errorMessage = errorLines.join(' ') || "No error message found";
229+
const errorLines = stderr.split("\n").filter((line) => line.trim());
230+
const errorMessage = errorLines.join(" ") || "No error message found";
229231
resolve({ success: false, error: errorMessage });
230232
}
231233
});

0 commit comments

Comments
 (0)