Render textured aerial maps and support legacy recovery links
This commit is contained in:
14
tests/legacy-recovery.test.ts
Normal file
14
tests/legacy-recovery.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { legacyRecoveryToken } from "../shared/legacy-recovery";
|
||||
|
||||
test("legacy recovery email path yields only its code segment", () => {
|
||||
assert.equal(legacyRecoveryToken("/code=abc12345-6789"), "abc12345-6789");
|
||||
for (const path of [
|
||||
"/code=short",
|
||||
"/code=abc12345/other",
|
||||
"/code=abc%2F12345",
|
||||
"/auth/callback",
|
||||
])
|
||||
assert.equal(legacyRecoveryToken(path), null);
|
||||
});
|
||||
Reference in New Issue
Block a user