home / client / test / config.test.mjs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
// config.cljs must resolve to exactly the constants the TS did.
import test from "node:test";
import assert from "node:assert/strict";
import { boot, vectors } from "./harness.mjs";

const { lib } = await boot();
const want = vectors("config");

test("the hub's constants are unchanged by the port", () => {
  const got = lib.config();
  assert.equal(got.APP_SALT, want.APP_SALT);
  assert.equal(got.NS, want.NS, "NS is the slug of APP_SALT — the localStorage namespace of every store");
  assert.equal(got.TURN_URL, want.TURN_URL);
  assert.equal(got.AP2P_DESCRIPTOR_URL, want.AP2P_DESCRIPTOR_URL);
  assert.deepEqual(JSON.parse(JSON.stringify(got.RELAY_FALLBACK)), want.RELAY_FALLBACK);
});

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/home.git