UNPKG

eslint-config-lemon

Version:

<div align="center"> <br> <img width="400" src="logo.svg"> <br> <br> </div>

47 lines (45 loc) 1.06 kB
import expect from 'expect'; import parserOptionsMapper from '../../__util__/parserOptionsMapper'; describe('parserOptionsMapper', () => { it('should return an test case object', () => { const testCase = { code: '<div />', errors: [], options: {}, }; expect(parserOptionsMapper(testCase)).toEqual({ code: '<div />', errors: [], options: {}, parserOptions: { ecmaVersion: 2018, ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true, }, }, }); }); it('should allow for overriding parserOptions', () => { const testCase = { code: '<div />', errors: [], options: {}, parserOptions: { ecmaVersion: 5, }, }; expect(parserOptionsMapper(testCase)).toEqual({ code: '<div />', errors: [], options: {}, parserOptions: { ecmaVersion: 5, ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true, }, }, }); }); });