@remit/backend 0.0.77 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/auth.test.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/backend",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "Remit Mail Inspector API backend",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -0,0 +1,12 @@
1
+ import assert from "node:assert/strict";
2
+ import { describe, test } from "node:test";
3
+ import { deriveAccountConfigId } from "./auth.js";
4
+
5
+ describe("derived ids are stored primary keys: a changed value orphans every row already written and needs a migration, never a new expectation here", () => {
6
+ test("deriveAccountConfigId pins the account a Cognito subject resolves to", () => {
7
+ assert.equal(
8
+ deriveAccountConfigId("golden-cognito-sub"),
9
+ "97h2fhd0c32ocenk6ju12oxto",
10
+ );
11
+ });
12
+ });