m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/__tests__/parser.test.js
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-30 16:36:40 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-30 16:36:40 -0400
commita7b971ef64f09a21902f34b6078b01d78dcf73e7 (patch)
treef3ed0e97fe3f31e8c7ca58e18a5835290e66c755 /__tests__/parser.test.js
parent5b77a409c912f7251da8c170bd4a3aa8826d989b (diff)
Implement threshold under
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 ad67fc4..6e575b6 100644
--- a/__tests__/parser.test.js
+++ b/__tests__/parser.test.js
@@ -241,6 +241,16 @@ describe('parse', () => {
right: { type: 'constant', value: 8 }
}
})
+
+ expect(parse('7t4d8')).toEqual({
+ type: 't',
+ left: { type: 'constant', value: 7 },
+ right: {
+ type: 'd',
+ left: { type: 'constant', value: 4 },
+ right: { type: 'constant', value: 8 }
+ }
+ })
})
describe('parsing parentheses', () => {