- Track referral attribution at registration via ?ref code with same-IP and duplicate-pair guards - Add daily login rewards with streak tracking, claim flow and sendCurrency payout backed by RCON with DB fallback - Add admin pages for referral settings and the daily reward schedule - Add migration 0033 with tables, seed schedule, settings and ACL grants - Add admin.referrals.* and admin.dailyrewards.* permission slugs - Localize new copy in en, nl and it
30 lines
959 B
TypeScript
30 lines
959 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { discoverLegacyPages } from "./discover-legacy-pages";
|
|
import { HOUSEKEEPING_MIGRATION_MATRIX } from "./matrix";
|
|
import { validateMigrationEntries } from "./validate-matrix";
|
|
|
|
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
|
|
it("covers all 146 legacy pages exactly once", () => {
|
|
const discovered = discoverLegacyPages();
|
|
|
|
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(146);
|
|
expect(
|
|
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
|
|
).toEqual([]);
|
|
});
|
|
|
|
it("contains no undecided evidence markers", () => {
|
|
expect(JSON.stringify(HOUSEKEEPING_MIGRATION_MATRIX)).not.toMatch(
|
|
/TBD|TODO|FIXME|UNCLASSIFIED/,
|
|
);
|
|
});
|
|
|
|
it("is sorted by legacy path", () => {
|
|
expect(HOUSEKEEPING_MIGRATION_MATRIX.map((row) => row.legacyPath)).toEqual(
|
|
[...HOUSEKEEPING_MIGRATION_MATRIX.map((row) => row.legacyPath)].sort(
|
|
(a, b) => a.localeCompare(b),
|
|
),
|
|
);
|
|
});
|
|
});
|