1- const chai = require ( 'chai' )
21const supertest = require ( 'supertest' )
3- const expect = require ( 'chai' ) . expect
42
53// The client listening to the mock rest server
64var client = supertest . agent ( 'http://localhost:8080' )
75
8- describe ( 'running XQsuite test …' , function ( ) {
6+ describe ( 'running XQsuite test …' , function ( ) {
97 this . timeout ( 60000 )
108 this . slow ( 45000 )
119 let runner = '/exist/rest/db/apps/doc/modules/test-runner.xql'
1210
13- it ( 'returns 0 errors or failures' , function ( done ) {
11+ it ( 'returns 0 errors or failures' , function ( done ) {
1412 client
1513 . get ( runner )
1614 . set ( 'Accept' , 'application/json' )
1715 . expect ( 'content-type' , 'application/json; charset=utf-8' )
18- . end ( function ( err , res ) {
16+ . end ( function ( err , res ) { // eslint-disable-line handle-callback-err
1917 try {
2018 console . group ( )
2119 console . group ( )
@@ -26,14 +24,14 @@ describe('running XQsuite test …', function() {
2624 done ( err )
2725 } finally {
2826 console . group ( )
29- res . body . testsuite . testcase . forEach ( function ( entry ) {
27+ res . body . testsuite . testcase . forEach ( function ( entry ) {
3028 if ( entry . failure ) {
3129 console . error ( [ entry . name , entry . failure . message ] )
3230 process . exit ( 1 )
3331 } else if ( entry . error ) {
3432 console . error ( [ entry . name , entry . error . message ] )
3533 process . exit ( 1 )
36- } else ( console . log ( entry . name ) )
34+ } else ( console . log ( entry . name ) )
3735 } )
3836 console . groupEnd ( )
3937 }
0 commit comments