This commit is contained in:
@@ -328,7 +328,7 @@ describe('verb-target-prep with "with"', () => {
|
||||
knownEncounters: [],
|
||||
visibleNouns: [
|
||||
{ id: 'lamp', aliases: ['lamp'] },
|
||||
{ id: 'matches', aliases: ['matches', 'matchbook'] },
|
||||
{ id: 'matches', aliases: ['matches', 'match', 'matchbook'] },
|
||||
],
|
||||
inventoryItemIds: ['matches'],
|
||||
lastNoun: null,
|
||||
@@ -346,6 +346,17 @@ describe('verb-target-prep with "with"', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('parses singular "match" aliases', () => {
|
||||
const cmd = parse('use match with lamp', ctx)
|
||||
expect(cmd).toEqual({
|
||||
kind: 'verb-target-prep',
|
||||
verb: 'use',
|
||||
target: { canonical: 'matches', raw: 'match' },
|
||||
preposition: 'with',
|
||||
indirect: { canonical: 'lamp', raw: 'lamp' },
|
||||
})
|
||||
})
|
||||
|
||||
it('parses "use shears on vines" into verb-target-prep', () => {
|
||||
const localCtx: ParserContext = {
|
||||
knownItems: ['shears', 'ivy-figure'],
|
||||
|
||||
Reference in New Issue
Block a user