11/* eslint-env jest */
2- import * as cp from 'child_process' ;
3- import * as fs from 'fs' ;
4- import * as path from 'path' ;
5- import * as http from 'http' ;
2+ import * as cp from 'node: child_process' ;
3+ import * as fs from 'node: fs' ;
4+ import * as path from 'node: path' ;
5+ import * as http from 'node: http' ;
66
77import { NeovimClient , attach , findNvim } from 'neovim' ;
88
@@ -37,11 +37,11 @@ describe('Node host', () => {
3737 `
3838 ) ;
3939
40- const minVersion = '0.9.5'
41- const nvimInfo = findNvim ( { minVersion : minVersion } ) ;
40+ const minVersion = '0.9.5' ;
41+ const nvimInfo = findNvim ( { minVersion } ) ;
4242 const nvimPath = nvimInfo . matches [ 0 ] ?. path ;
4343 if ( ! nvimPath ) {
44- throw new Error ( `nvim ${ minVersion } not found` )
44+ throw new Error ( `nvim ${ minVersion } not found` ) ;
4545 }
4646
4747 cp . spawnSync ( nvimPath , args ) ;
@@ -115,10 +115,10 @@ describe('Node host', () => {
115115 const childHost = cp . spawn (
116116 process . execPath ,
117117 [ path . join ( __dirname , '..' , '..' , 'neovim' , 'bin' , 'cli.js' ) ] ,
118- { env : { NVIM_NODE_HOST_DEBUG : 1 } , stdio : 'ignore' }
118+ { env : { NVIM_NODE_HOST_DEBUG : 'TRUE' } , stdio : 'ignore' }
119119 ) ;
120120
121- setTimeout ( function ( ) {
121+ setTimeout ( ( ) => {
122122 http . get ( 'http://127.0.0.1:9229/json/list' , res => {
123123 let rawData = '' ;
124124 res . on ( 'data' , chunk => {
@@ -133,7 +133,8 @@ describe('Node host', () => {
133133 'ws://127.0.0.1:9229'
134134 ) ;
135135 done ( ) ;
136- } catch ( e ) {
136+ } catch ( e : any ) {
137+ // eslint-disable-next-line no-console
137138 console . error ( e . message ) ;
138139 throw e ;
139140 }
0 commit comments