@@ -57,32 +57,6 @@ function getMocks () {
5757test . beforeEach ( tools . stubConsole ) ;
5858test . afterEach . always ( tools . restoreConsole ) ;
5959
60- test . serial ( `http:helloworld: should error with no message` , ( t ) => {
61- const mocks = getMocks ( ) ;
62- const httpSample = getSample ( ) ;
63- mocks . req . body = { } ;
64- httpSample . sample . helloWorld ( mocks . req , mocks . res ) ;
65-
66- t . true ( mocks . res . status . calledOnce ) ;
67- t . is ( mocks . res . status . firstCall . args [ 0 ] , 400 ) ;
68- t . true ( mocks . res . send . calledOnce ) ;
69- t . is ( mocks . res . send . firstCall . args [ 0 ] , `No message defined!` ) ;
70- } ) ;
71-
72- test . serial ( `http:helloworld: should log message` , ( t ) => {
73- const mocks = getMocks ( ) ;
74- const httpSample = getSample ( ) ;
75- mocks . req . body = {
76- message : `hi`
77- } ;
78- httpSample . sample . helloWorld ( mocks . req , mocks . res ) ;
79-
80- t . true ( mocks . res . status . calledOnce ) ;
81- t . is ( mocks . res . status . firstCall . args [ 0 ] , 200 ) ;
82- t . true ( mocks . res . end . calledOnce ) ;
83- t . true ( console . log . calledWith ( `hi` ) ) ;
84- } ) ;
85-
8660test . serial ( `http:helloHttp: should handle GET` , ( t ) => {
8761 const mocks = getMocks ( ) ;
8862 const httpSample = getSample ( ) ;
0 commit comments