feat: weapon wound kinds as vault slashing/piercing/blunt list
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { parseWoundKind } from '../../scripts/parsers/gear-parser';
|
||||
import { parseWoundKinds } from '../../scripts/parsers/gear-parser';
|
||||
|
||||
describe('gear-parser parseWoundKind', () => {
|
||||
it('maps Polish and English labels', () => {
|
||||
expect(parseWoundKind('tnąca')).toBe('cutting');
|
||||
expect(parseWoundKind('Kłująca')).toBe('piercing');
|
||||
expect(parseWoundKind('obuchowa')).toBe('blunt');
|
||||
expect(parseWoundKind('piercing')).toBe('piercing');
|
||||
describe('gear-parser parseWoundKinds', () => {
|
||||
it('maps English and Polish labels, single or listed', () => {
|
||||
expect(parseWoundKinds('slashing')).toEqual(['slashing']);
|
||||
expect(parseWoundKinds('kłute')).toEqual(['piercing']);
|
||||
expect(parseWoundKinds('piercing, slashing')).toEqual(['piercing', 'slashing']);
|
||||
expect(parseWoundKinds('slashing, piercing, blunt, slashing')).toEqual(['slashing', 'piercing', 'blunt']);
|
||||
});
|
||||
|
||||
it('never guesses: missing or unknown stays unspecified', () => {
|
||||
expect(parseWoundKind(undefined)).toBe('');
|
||||
expect(parseWoundKind('')).toBe('');
|
||||
expect(parseWoundKind('ognista')).toBe('');
|
||||
it('never guesses: missing or unknown stays empty', () => {
|
||||
expect(parseWoundKinds(undefined)).toEqual([]);
|
||||
expect(parseWoundKinds('')).toEqual([]);
|
||||
expect(parseWoundKinds('ognista')).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user