diff options
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 6900764..d7a4368 100644 --- a/__tests__/lexer.test.js +++ b/__tests__/lexer.test.js @@ -161,4 +161,16 @@ describe('lex', () => { ]) }) }) + + describe('bonusAdd', () => { + test('3d4+1', () => { + expect(lex('3d4+1')).toEqual([ + { type: 'constant', value: 3 }, + { type: 'd' }, + { type: 'constant', value: 4 }, + { type: 'plus' }, + { type: 'constant', value: 1 } + ]) + }) + }) }) |