1- //let app = require(process.cwd() + '/demo/server'); // start server
2-
31import { routeInfo } from "./demo/server" ;
4-
52import * as chai from "chai" ;
63
74const chaiHttp = require ( "chai-http" ) ;
85const should = chai . should ( ) ;
96const expect = chai . expect ;
10-
117const URL = "http://localhost:3000" ;
128
13-
14- //import {server} from "./demo/server";
15-
169chai . use ( chaiHttp ) ;
1710
1811
19- //let server = require('../demo/server');
20-
2112describe ( 'Server is Up: ' , ( ) => {
2213 it ( 'Has 13 routes' , ( ) => {
2314 routeInfo . length . should . be . eql ( 13 ) ;
@@ -76,6 +67,7 @@ describe('Basic routes: ', () => {
7667
7768} ) ;
7869
70+
7971describe ( 'Middleware: ' , ( ) => {
8072 it ( '/hasmiddleware GET - as array - has property "mdlw"' , ( done ) => {
8173 chai . request ( URL )
@@ -116,6 +108,7 @@ describe('Middleware: ', () => {
116108
117109} ) ;
118110
111+
119112describe ( 'Controller custom name: ' , ( ) => {
120113
121114 it ( '/customControllerPath GET - has custom controller path' , ( done ) => {
@@ -132,6 +125,7 @@ describe('Controller custom name: ', () => {
132125
133126} ) ;
134127
128+
135129describe ( 'Global params: ' , ( ) => {
136130 it ( '/other/hasbaseUrl GET - BASEURL has "/other"' , ( done ) => {
137131 chai . request ( URL )
0 commit comments