diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-09-05 22:29:24 -0400 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-09-05 22:29:24 -0400 |
commit | 83983efa99d910a97a72fc8b00dd9d7eb8829368 (patch) | |
tree | 17ac7dbb2332bdc7a5005264c591e894e674b0cf /__tests__/lexer.test.js | |
parent | fb5cf866c56184dd615e4b7ec5cf6ed1a4703903 (diff) |
Implement multiplicative bonuses
Diffstat (limited to '__tests__/lexer.test.js')
-rw-r--r-- | __tests__/lexer.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/__tests__/lexer.test.js b/__tests__/lexer.test.js index 6745715..31150bc 100644 --- a/__tests__/lexer.test.js +++ b/__tests__/lexer.test.js @@ -241,6 +241,18 @@ describe('lex', () => { }) }) + describe('bonusMultiply', () => { + test('3d4*1', () => { + expect(lex('3d4*1')).toEqual([ + { type: 'constant', value: 3 }, + { type: 'd' }, + { type: 'constant', value: 4 }, + { type: 'times' }, + { type: 'constant', value: 1 } + ]) + }) + }) + describe('again', () => { test('6A3d6', () => { expect(lex('6A3d6')).toEqual([ |