fix: complete jump-hop frontend wiring

This commit is contained in:
kdletters
2026-05-22 06:19:59 +08:00
parent 7b8cb82bf0
commit 1756b83789
10 changed files with 132 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
import { describe, expect, it } from 'vitest';
import {
buildJumpHopPublicWorkCode,
isSameJumpHopPublicWorkCode,
} from './publicWorkCode';
describe('publicWorkCode', () => {
it('builds and matches jump-hop public work codes from profile ids', () => {
expect(buildJumpHopPublicWorkCode('jump-hop-profile-12345678')).toBe(
'JH-12345678',
);
expect(
isSameJumpHopPublicWorkCode(
'jh-12345678',
'jump-hop-profile-12345678',
),
).toBe(true);
expect(
isSameJumpHopPublicWorkCode(
'jump hop profile 12345678',
'jump-hop-profile-12345678',
),
).toBe(true);
});
});