From 7efea0582dda35cd7dc0c370ef3b56c84b2f2291 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Wed, 30 Aug 2017 16:25:34 -0400 Subject: Implement explode under --- __tests__/parser.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '__tests__/parser.test.js') diff --git a/__tests__/parser.test.js b/__tests__/parser.test.js index 70ad98d..765388d 100644 --- a/__tests__/parser.test.js +++ b/__tests__/parser.test.js @@ -173,6 +173,16 @@ describe('parse', () => { right: { type: 'constant', value: 6 } } }) + + expect(parse('1e1d6')).toEqual({ + type: 'e', + left: { type: 'constant', value: 1 }, + right: { + type: 'd', + left: { type: 'constant', value: 1 }, + right: { type: 'constant', value: 6 } + } + }) }) it('parses dice with keep high', () => { -- cgit v1.2.3