From 12bf6daf62a492d348ec6b864d16c79735009f1d Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sat, 17 Sep 2016 22:35:34 +0200 Subject: [PATCH] Fix #564: Fix tests not running due to Espree bump (#565) * Fix #564: Fix tests not running due to Espree bump * updated malformed test also, the most trivial of line formatting changes --- tests/src/rules/export.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/src/rules/export.js b/tests/src/rules/export.js index 97714dc5f..91e3a000b 100644 --- a/tests/src/rules/export.js +++ b/tests/src/rules/export.js @@ -2,7 +2,7 @@ import { test, SYNTAX_CASES } from '../utils' import { RuleTester } from 'eslint' -var ruleTester = new RuleTester() +var ruleTester = new RuleTester({ parser: 'babel-eslint' }) , rule = require('rules/export') ruleTester.run('export', rule, { @@ -71,10 +71,12 @@ ruleTester.run('export', rule, { // '\'./default-export\'.' // , type: 'Literal' }] }), + // note: Espree bump to Acorn 4+ changed this test's error message. + // `npm up` first if it's failing. test({ code: 'export * from "./malformed.js"', errors: [{ - message: "Parse errors in imported module './malformed.js': 'return' outside of function (1:1)", + message: "Parse errors in imported module './malformed.js': Line 1: Unexpected token (1:12)", type: 'Literal', }], }),