{"draft":null,"from":155,"to":156,"files":[{"path":"client/test/box.test.ts","added":8,"removed":13,"diff":"--- a/client/test/box.test.ts\n+++ b/client/test/box.test.ts\n@@ -383,27 +383,22 @@\n \tassert.equal(forgetBox(SERVER, h), false);\n });\n \n-test(\"join and init pick the server: --server, ABSO_SERVER, the box's sign-in, then api.abso.dev\", () => {\n+test(\"join and init pick the server in the one order: --server, the folder's, ABSO_SERVER, then prod\", () => {\n \tconst h = home();\n+\tconst outside = home();\n \tconst args = (server?: string) => ({ positionals: [], flags: new Map(server ? [[\"server\", server]] : []) });\n-\tconst none = { env: {} };\n-\tassert.equal(serverFrom(args(), none, h), \"https://api.abso.dev\", \"nothing signed in: the abso API\");\n+\tconst none = { env: {}, cwd: outside };\n+\tassert.equal(serverFrom(args(), none), \"https://api.abso.dev\", \"nothing named: prod\");\n \twriteBox({ ...record, expiresAt: Date.now() + 1e6 }, h);\n \tassert.deepEqual(signedInServers(h), [SERVER]);\n-\tassert.equal(serverFrom(args(), none, h), SERVER, \"the server abso login signed this box in to\");\n+\tassert.equal(serverFrom(args(), none), \"https://api.abso.dev\", \"a sign-in elsewhere doesn't pick the server\");\n \tassert.deepEqual(signedInServers(h, Date.now() + 2e6), [], \"an expired sign-in doesn't count\");\n-\tassert.equal(serverFrom(args(), { env: { ABSO_SERVER: \"https://env.example\" } }, h), \"https://env.example\");\n+\tassert.equal(serverFrom(args(), { ...none, env: { ABSO_SERVER: \"https://env.example\" } }), \"https://env.example\");\n \tassert.equal(\n-\t\tserverFrom(args(\"https://flag.example\"), { env: { ABSO_SERVER: \"https://env.example\" } }, h),\n+\t\tserverFrom(args(\"https://flag.example\"), { ...none, env: { ABSO_SERVER: \"https://env.example\" } }),\n \t\t\"https://flag.example\",\n \t);\n-\twriteBox({ ...record, server: \"https://other.abso.example\", expiresAt: Date.now() + 1e6 }, h);\n-\twriteBox({ ...record, expiresAt: Date.now() + 1e6 }, h);\n-\tassert.throws(\n-\t\t() => serverFrom(args(), none, h),\n-\t\t/signed in to https:\\/\\/other\\.abso\\.example and https:\\/\\/staging\\.abso\\.example: say which with --server/,\n-\t);\n-\tassert.equal(serverFrom(args(SERVER), none, h), SERVER, \"--server settles it\");\n+\tassert.equal(serverFrom(args(SERVER), none), SERVER, \"--server is used as given\");\n });\n \n test(\"join with no --agent takes the box's name, skips names this box holds, and moves past a taken one\", async () => {"}],"unmatched":[]}