m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/__tests__/lexer.test.js
diff options
context:
space:
mode:
Diffstat (limited to '__tests__/lexer.test.js')
-rw-r--r--__tests__/lexer.test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/__tests__/lexer.test.js b/__tests__/lexer.test.js
index 0c615d5..6745715 100644
--- a/__tests__/lexer.test.js
+++ b/__tests__/lexer.test.js
@@ -284,4 +284,16 @@ describe('lex', () => {
])
})
})
+
+ describe('repeat', () => {
+ test('1d6 x 3', () => {
+ expect(lex('1d6 x 3')).toEqual([
+ { type: 'constant', value: 1 },
+ { type: 'd' },
+ { type: 'constant', value: 6 },
+ { type: ' x ' },
+ { type: 'constant', value: 3 }
+ ])
+ })
+ })
})