TomFrost / Jexl

Javascript Expression Language: Powerful context-based expression parser and evaluator
MIT License
561 stars 92 forks source link

evalSync doesn't seem to throw error to transform #52

Closed bitghostm closed 5 years ago

bitghostm commented 5 years ago
    it('throws if transform fails', async () => {
      inst.addTransform('abort', (val, args) => { throw new Error('oops') })
      expect(inst.evalSync.bind(inst, '"hello"|abort')).toThrow(/oops/)
    })
TomFrost commented 5 years ago

Wow, great catch and best possible bug report format. I’ll look into this!