33 lines
900 B
TypeScript
33 lines
900 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import {
|
|
gameDataCorrectionHref,
|
|
gameDataDiscussionId,
|
|
gameDataTarget,
|
|
} from './game-data-targets';
|
|
|
|
describe('game-data public targets', () => {
|
|
it('maps every public category to its ISAC registry', () => {
|
|
expect(gameDataTarget('weapons')).toEqual({
|
|
type: 'weapon',
|
|
module: 'weapons',
|
|
});
|
|
expect(gameDataTarget('weapon-mods')).toEqual({
|
|
type: 'weapon_mod',
|
|
module: 'weaponmods',
|
|
});
|
|
expect(gameDataTarget('skill-chips')).toEqual({
|
|
type: 'skill_chip',
|
|
module: 'skillchips',
|
|
});
|
|
});
|
|
|
|
it('uses a stable exact-item correction link and discussion identity', () => {
|
|
expect(gameDataCorrectionHref('talents', 'talent id')).toBe(
|
|
'/isac/talents?item=talent%20id',
|
|
);
|
|
expect(gameDataDiscussionId('talent', 'talent-id')).toBe(
|
|
'talent:talent-id',
|
|
);
|
|
});
|
|
});
|