m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/__tests__/parser.test.js
diff options
context:
space:
mode:
Diffstat (limited to '__tests__/parser.test.js')
-rw-r--r--__tests__/parser.test.js10
1 files changed, 10 insertions, 0 deletions
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', () => {