-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
it('Handle character choice in context', function () {
const context = {
lucy: {
name: 'Lucy',
pronoun: 'she',
car: 'Lexus'
},
sam: {
name: 'Sam',
pronoun: 'he',
car: 'Subaru'
},
};
const script = {
start: "Meet $person.name. $person.pronoun().cap drives a $person.car().",
"#person": "$[sam | lucy]"
};
const res = RiGrammar.expand(script, context);
console.log(res);
expect(res).matches(/an ox(en)?/);
});Reactions are currently unavailable