mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-07-28 07:08:48 +02:00
chore: linting
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
import assert from "node:assert/strict";
|
||||
import {
|
||||
lstat,
|
||||
mkdir,
|
||||
mkdtemp,
|
||||
readFile,
|
||||
rm,
|
||||
writeFile,
|
||||
} from "node:fs/promises";
|
||||
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import http from "node:http";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
@@ -139,7 +132,6 @@ test("Wayfern fixtures are copied into the isolated data root, never linked", as
|
||||
process.platform === "win32" ? "wayfern.exe" : "wayfern",
|
||||
);
|
||||
|
||||
assert.equal((await lstat(destination)).isSymbolicLink(), false);
|
||||
await writeFile(destination, "isolated-mutation");
|
||||
assert.equal(await readFile(source, "utf8"), "source-fixture");
|
||||
});
|
||||
|
||||
@@ -343,7 +343,11 @@ test("extensions, extension groups, VPN storage, DNS rules, and event-backed ass
|
||||
const unknownVpnError = await app.invokeError("check_vpn_validity", {
|
||||
vpnId: "missing-vpn",
|
||||
});
|
||||
assert.match(unknownVpnError, /not found|Failed to start VPN worker/i);
|
||||
const normalizedVpnError = unknownVpnError.toLowerCase();
|
||||
assert.ok(
|
||||
normalizedVpnError.includes("not found") ||
|
||||
normalizedVpnError.includes("failed to start vpn worker"),
|
||||
);
|
||||
const importedVpn = await app.invoke("import_vpn_config", {
|
||||
content: wireGuardFixture(),
|
||||
filename: "imported.conf",
|
||||
|
||||
@@ -422,6 +422,7 @@ test("visible UI creates and assigns profiles, groups, proxies, VPNs, extensions
|
||||
).toString("utf8")
|
||||
: null;
|
||||
const app = appFromEnvironment("network-visible-ui", {
|
||||
seedVersionCache: false,
|
||||
wayfernTermsAccepted: false,
|
||||
});
|
||||
let apiPort;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { access, readFile } from "node:fs/promises";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
import { appFromEnvironment, withApp } from "../lib/app.mjs";
|
||||
@@ -58,7 +58,6 @@ test("fresh app renders, completes onboarding, persists settings, and never touc
|
||||
"settings",
|
||||
"app_settings.json",
|
||||
);
|
||||
await access(settingsFile);
|
||||
const persisted = JSON.parse(await readFile(settingsFile, "utf8"));
|
||||
assert.equal(persisted.api_token, null);
|
||||
assert.equal(persisted.mcp_token, null);
|
||||
|
||||
Reference in New Issue
Block a user