@@ -55,7 +55,8 @@ define(function (require, exports, module) {
5555 } , 30000 ) ;
5656
5757 const JSHintErrorES6Error_js = "Missing semicolon. jshint (W033)" ,
58- ESLintErrorES7Error_js = "Parsing error: Unexpected token ; ESLint (null)" ;
58+ ESLintErrorES7Error_js = "Parsing error: Unexpected token ; ESLint (null)" ,
59+ ESLintErrorES8Error_js = "Expected '===' and instead saw '=='. ESLint (eqeqeq)" ;
5960
6061 async function _createTempProject ( esLintSpecSubFolder ) {
6162 return await SpecRunnerUtils . getTempTestDirectory ( testRootSpec + esLintSpecSubFolder ) ;
@@ -187,9 +188,38 @@ define(function (require, exports, module) {
187188 await awaitsFor ( ( ) => {
188189 return $ ( "#problems-panel" ) . text ( ) . includes ( JSHintErrorES6Error_js ) ;
189190 } , "JShint error to be shown" ) ;
191+ expect ( $ ( "#problems-panel" ) . text ( ) . includes ( "JSHint" ) ) . toBeTrue ( ) ;
190192 } , 5000 ) ;
193+ } ) ;
194+
195+ describe ( "ES8 module project" , function ( ) {
196+ let es7ProjectPath ;
191197
192- // todo eslint module test
198+ beforeAll ( async function ( ) {
199+ es7ProjectPath = await _createTempProject ( "es8_module" ) ;
200+ await _npmInstallInFolder ( es7ProjectPath ) ;
201+ await SpecRunnerUtils . loadProjectInTestWindow ( es7ProjectPath ) ;
202+ } , 30000 ) ;
203+
204+ async function _loadAndValidateES8Project ( ) {
205+ await _openProjectFile ( "error.js" ) ;
206+ await _waitForProblemsPanelVisible ( true ) ;
207+ await awaitsFor ( ( ) => {
208+ return $ ( "#problems-panel" ) . text ( ) . includes ( ESLintErrorES8Error_js ) ;
209+ } , "ESLint v8 error to be shown" ) ;
210+ }
211+
212+ it ( "should ESLint v8 work as expected" , async function ( ) {
213+ await _loadAndValidateES8Project ( ) ;
214+ } , 5000 ) ;
215+
216+ it ( "should not show JSHint in desktop app if ESLint is active" , async function ( ) {
217+ await _loadAndValidateES8Project ( ) ;
218+ await awaits ( 100 ) ; // give some time so that jshint has time to complete if there is any.
219+ expect ( $ ( "#problems-panel" ) . text ( ) . includes ( "JSHint" ) ) . toBeFalse ( ) ;
220+ } , 5000 ) ;
193221 } ) ;
222+
223+ // todo eslint module test for es9
194224 } ) ;
195225} ) ;
0 commit comments